From 552d84648643fe8dde62321e5b015c07535c6c0b Mon Sep 17 00:00:00 2001 From: LouisGac Date: Thu, 17 Nov 2016 14:03:04 +0100 Subject: [PATCH] Fixed issue: (Debug Mode) PHP notice when entering a non existent user name on login. --- application/core/plugins/Authdb/Authdb.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/application/core/plugins/Authdb/Authdb.php b/application/core/plugins/Authdb/Authdb.php index a0a8f9d017e..c42fc2c06d7 100644 --- a/application/core/plugins/Authdb/Authdb.php +++ b/application/core/plugins/Authdb/Authdb.php @@ -131,7 +131,10 @@ public function newUserSession() if ($user == null){ $user = $this->api->getUserByEmail($username); - $this->setUsername($user->users_name); + + if (is_object($user)){ + $this->setUsername($user->users_name); + } } if ($user !== null && $user->uid != 1 && !Permission::model()->hasGlobalPermission('auth_db','read',$user->uid))