mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-15 00:56:59 +02:00
Hotfix for password update
This commit is contained in:
parent
955dd6ffe0
commit
c923aaceb0
2 changed files with 10 additions and 6 deletions
|
@ -312,9 +312,11 @@ class UsersController extends Controller
|
|||
return $response->withHeader('Location', '/user/update/'.$old_username)->withStatus(302);
|
||||
}
|
||||
|
||||
if (!checkPasswordComplexity($password)) {
|
||||
$this->container->get('flash')->addMessage('error', 'Password too weak. Use a stronger password');
|
||||
return $response->withHeader('Location', '/user/update/'.$old_username)->withStatus(302);
|
||||
if (!empty($password)) {
|
||||
if (!checkPasswordComplexity($password)) {
|
||||
$this->container->get('flash')->addMessage('error', 'Password too weak. Use a stronger password');
|
||||
return $response->withHeader('Location', '/user/update/'.$old_username)->withStatus(302);
|
||||
}
|
||||
}
|
||||
|
||||
// Check if username already exists (excluding the current user)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue