We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 2b5bba41 authored by Jørgen Bøhnsdalen's avatar Jørgen Bøhnsdalen

Removed 'created' and 'modified' columns from table Users.

Set entry in AccountActivation to be deleted upon successful activation.
parent d062b5ce
......@@ -71,14 +71,12 @@ if (isset($_POST['install'])) {
bio TEXT,
homepage VARCHAR(255),
location VARCHAR(255),
created INTEGER NOT NULL,
modified INTEGER,
userlevel INTEGER DEFAULT 0,
anticommercial INTEGER DEFAULT 0,
webid_uri VARCHAR(255),
avatar_uri VARCHAR(255),
openid_uri VARCHAR(100),
active INTEGER DEFAULT 1,
active INTEGER DEFAULT 0,
public_export INTEGER DEFAULT 0,
location_uri VARCHAR(255) REFERENCES Places(location_uri),
laconica_profile VARCHAR(255),
......
......@@ -54,9 +54,11 @@ if(isset($_GET['auth'])) {
die();
}
$sql = 'UPDATE Users SET active = 1 WHERE username = ' . $adodb->qstr($row['username']);
$sql_update = 'UPDATE Users SET active = 1 WHERE username = ' . $adodb->qstr($row['username']);
$sql_delete = 'DELETE FROM AccountActivation WHERE authcode = ' . $adodb->qstr($authcode);
try {
$res = $adodb->Execute($sql);
$res = $adodb->Execute($sql_update);
$res = $adodb->Execute($sql_delete);
}
catch (exception $e) {
$errors = 'Error: ' . $e->getMessage();
......@@ -111,14 +113,13 @@ if(isset($_POST['register'])) {
if(empty($errors)) {
// Create the user
$sql = 'INSERT INTO Users (username, password, email, fullname, bio, location, created, active) VALUES ('
$sql = 'INSERT INTO Users (username, password, email, fullname, bio, location, active) VALUES ('
. $adodb->qstr($username) . ', '
. $adodb->qstr(md5($password)) . ', '
. $adodb->qstr($email) . ', '
. $adodb->qstr($fullname) . ', '
. $adodb->qstr($bio) . ', '
. $adodb->qstr($location) . ', '
. time() . ', 0)';
. $adodb->qstr($location) . ', 0)';
try {
$insert = $adodb->Execute($sql);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment