check if the user of the session is in the database
This commit is contained in:
parent
f6899abfeb
commit
35826189ec
1 changed files with 2 additions and 2 deletions
|
@ -48,10 +48,10 @@ class Login {
|
||||||
{
|
{
|
||||||
if (Session::get('fingerPrint')===$this->fingerPrint()) {
|
if (Session::get('fingerPrint')===$this->fingerPrint()) {
|
||||||
$username = Session::get('username');
|
$username = Session::get('username');
|
||||||
if (!empty($username)) {
|
if (!empty($username) && $this->users->getUserDB($username) !== false) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} 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();
|
Session::destroy();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue