mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 14:18:27 +01:00
Fix validation for user current password (#5186)
This commit is contained in:
parent
b7ddfd57e2
commit
53662c6032
@ -47,7 +47,7 @@ class CheckPasswordValidator extends Validator
|
||||
* @param User $user the user or null for current
|
||||
* @return boolean
|
||||
*/
|
||||
public static function hasPassword(ModelUser $user = null)
|
||||
public static function hasPassword(ModelUser $user = null): bool
|
||||
{
|
||||
if ($user === null) {
|
||||
$user = Yii::$app->user->getIdentity();
|
||||
@ -57,7 +57,7 @@ class CheckPasswordValidator extends Validator
|
||||
return false;
|
||||
}
|
||||
|
||||
return !empty($user->currentPassword->currentPassword);
|
||||
return !empty($user->currentPassword->password);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user