sforkowany z mirror/friendica
Add Exception when password is empty in User::hashPassword()
rodzic
b73d5a641f
commit
0496822ca3
|
@ -258,6 +258,10 @@ class User
|
|||
*/
|
||||
public static function hashPassword($password)
|
||||
{
|
||||
if (!trim($password)) {
|
||||
throw new Exception(L10n::t('Password can\'t be empty'));
|
||||
}
|
||||
|
||||
return password_hash($password, PASSWORD_DEFAULT);
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue