fix: password length when changed user password

This commit is contained in:
Diego Najar 2024-06-22 16:34:24 +02:00
parent 6248ea0a62
commit e770d6a972

View file

@ -677,8 +677,8 @@ function changeUserPassword($args)
$confirmPassword = $args['confirmPassword'];
// Password length
if (Text::length($newPassword) < 6) {
Alert::set($L->g('Password must be at least 6 characters long'), ALERT_STATUS_FAIL);
if (Text::length($newPassword) < PASSWORD_LENGTH) {
Alert::set($L->g('Password must be at least ' . PASSWORD_LENGTH . ' characters long'), ALERT_STATUS_FAIL);
return false;
}