Merge pull request #1427 from gaincoder/main
check if the user of the session is in the database
This commit is contained in:
commit
29563c8add
1 changed files with 2 additions and 2 deletions
|
@ -48,10 +48,10 @@ class Login {
|
|||
{
|
||||
if (Session::get('fingerPrint')===$this->fingerPrint()) {
|
||||
$username = Session::get('username');
|
||||
if (!empty($username)) {
|
||||
if (!empty($username) && $this->users->exists($username)) {
|
||||
return true;
|
||||
} else {
|
||||
Log::set(__METHOD__.LOG_SEP.'Session username empty, destroying the session.');
|
||||
Log::set(__METHOD__.LOG_SEP.'Session username empty or user not found, destroying the session.');
|
||||
Session::destroy();
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue