From b5ac1fa2a33ae046fa785d9938dcd0d5274b7ce1 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 10 Jun 2024 21:09:15 -0700 Subject: Make sure to check users for being false --- src/SemanticScuttle/Service/AuthUser.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/SemanticScuttle/Service/AuthUser.php') diff --git a/src/SemanticScuttle/Service/AuthUser.php b/src/SemanticScuttle/Service/AuthUser.php index 9447ee4..f0bc908 100644 --- a/src/SemanticScuttle/Service/AuthUser.php +++ b/src/SemanticScuttle/Service/AuthUser.php @@ -168,10 +168,12 @@ class SemanticScuttle_Service_AuthUser extends SemanticScuttle_Service_User //user must have changed password in external auth. //we need to update the local database. $user = $this->getUserByUsername($username); - $this->_updateuser( - $user['uId'], $this->getFieldName('password'), - $this->sanitisePassword($password) - ); + if ($user) { + $this->_updateuser( + $user['uId'], $this->getFieldName('password'), + $this->sanitisePassword($password) + ); + } return parent::login($username, $password, $remember); } @@ -229,4 +231,4 @@ class SemanticScuttle_Service_AuthUser extends SemanticScuttle_Service_User } } -?> \ No newline at end of file +?> -- cgit v1.2.3-54-g00ecf