Bug fixes on Remember me function

This commit is contained in:
Diego Najar 2018-01-01 20:19:45 +01:00
parent 8217d8b873
commit e4d7781dbe
3 changed files with 5 additions and 5 deletions

View File

@ -53,7 +53,6 @@ function checkRememberMe()
return true; return true;
} }
$Security->addToBlacklist();
return false; return false;
} }

View File

@ -180,8 +180,10 @@ class dbUsers extends dbJSON
public function getByRememberToken($token) public function getByRememberToken($token)
{ {
foreach ($this->db as $username=>$fields) { foreach ($this->db as $username=>$fields) {
if ($fields['tokenRemember']==$token) { if (!empty($fields['tokenRemember'])) {
return $username; if ($fields['tokenRemember']==$token) {
return $username;
}
} }
} }
return false; return false;

View File

@ -379,8 +379,7 @@ function install($adminPassword, $email, $timezone)
'salt'=>$salt, 'salt'=>$salt,
'email'=>$email, 'email'=>$email,
'registered'=>$currentDate, 'registered'=>$currentDate,
'tokenEmail'=>'', 'tokenRemember'=>'',
'tokenEmailTTL'=>'2009-03-15 14:00',
'tokenAuth'=>$tokenAuth, 'tokenAuth'=>$tokenAuth,
'tokenAuthTTL'=>'2009-03-15 14:00', 'tokenAuthTTL'=>'2009-03-15 14:00',
'twitter'=>'', 'twitter'=>'',