check if the user of the session is in the database - change method

This commit is contained in:
Tim Moritz 2022-05-09 08:42:24 +02:00
parent 35826189ec
commit 4a72c5968e

View file

@ -48,7 +48,7 @@ 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) && $this->users->getUserDB($username) !== false) { if (!empty($username) && $this->users->exists($username)) {
return true; return true;
} else { } else {
Log::set(__METHOD__.LOG_SEP.'Session username empty or user not found, destroying the session.'); Log::set(__METHOD__.LOG_SEP.'Session username empty or user not found, destroying the session.');