[DEV-299] Fix missing validations (#1195)

This commit is contained in:
Maximiliano Redigonda 2022-05-02 17:41:16 -03:00 committed by GitHub
parent a74d6ab4d7
commit e190710252
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ class Staff extends DataStore {
public static function authenticate($userEmail, $userPassword) {
$user = Staff::getUser($userEmail, 'email');
return ($user && Hashing::verifyPassword($userPassword, $user->password)) ? $user : new NullDataStore();
return (!$user->isNull() && Hashing::verifyPassword($userPassword, $user->password)) ? $user : new NullDataStore();
}
public static function getProps() {