mirror of
https://github.com/opensupports/opensupports.git
synced 2025-07-31 01:35:15 +02:00
[DEV-299] Fix missing validations (#1195)
This commit is contained in:
parent
a74d6ab4d7
commit
e190710252
@ -19,7 +19,7 @@ class Staff extends DataStore {
|
|||||||
public static function authenticate($userEmail, $userPassword) {
|
public static function authenticate($userEmail, $userPassword) {
|
||||||
$user = Staff::getUser($userEmail, 'email');
|
$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() {
|
public static function getProps() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user