refactor: Trust PHP session and remove remember me cookie (#4608)

This commit is contained in:
Eldon Koyle
2016-12-26 16:11:00 -07:00
committed by Neil Lathwood
parent 2f744fb52a
commit 3b198243d5
5 changed files with 154 additions and 57 deletions

View File

@@ -110,7 +110,7 @@ function adduser($username, $level = 0, $email = '', $realname = '', $can_modify
{
// Check to see if user is already added in the database
if (!user_exists_in_db($username)) {
$userid = dbInsert(array('username' => $username, 'realname' => $realname, 'email' => $email, 'descr' => $description, 'level' => $level, 'can_modify_passwd' => $can_modify_passwd, 'twofactor' => $twofactor, 'user_id' => get_userid($username)), 'users');
$userid = dbInsert(array('username' => $username, 'realname' => $realname, 'email' => $email, 'descr' => $description, 'level' => $level, 'can_modify_passwd' => $can_modify_passwd, 'twofactor' => $twofactor), 'users');
if ($userid == false) {
return false;
} else {