mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-14 16:46:59 +02:00
Added ability to have password policy and password expiration
This commit is contained in:
parent
e0eeaed83c
commit
2620dfd7f3
5 changed files with 51 additions and 3 deletions
|
@ -115,6 +115,11 @@ class RegistrarsController extends Controller
|
|||
return $response->withHeader('Location', '/registrar/create')->withStatus(302);
|
||||
}
|
||||
|
||||
if (!checkPasswordComplexity($data['panelPassword'])) {
|
||||
$this->container->get('flash')->addMessage('error', 'Password too weak. Use a stronger password');
|
||||
return $response->withHeader('Location', '/registrar/create')->withStatus(302);
|
||||
}
|
||||
|
||||
$db->beginTransaction();
|
||||
|
||||
try {
|
||||
|
@ -650,7 +655,12 @@ class RegistrarsController extends Controller
|
|||
$this->container->get('flash')->addMessage('error', $errorText);
|
||||
return $response->withHeader('Location', '/registrar/update/'.$registrar)->withStatus(302);
|
||||
}
|
||||
|
||||
|
||||
if (!checkPasswordComplexity($data['panelPassword'])) {
|
||||
$this->container->get('flash')->addMessage('error', 'Password too weak. Use a stronger password');
|
||||
return $response->withHeader('Location', '/registrar/update/'.$registrar)->withStatus(302);
|
||||
}
|
||||
|
||||
if (!empty($_SESSION['registrars_user_email'])) {
|
||||
$regEmail = $_SESSION['registrars_user_email'][0];
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue