Skip to content

Commit

Permalink
Apply php-cs-fixer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dvesh3 authored and github-actions[bot] committed Mar 14, 2023
1 parent 213c9e5 commit 266c5b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bundles/AdminBundle/Controller/Admin/LoginController.php
Expand Up @@ -177,7 +177,6 @@ public function lostpasswordAction(Request $request, ?BruteforceProtectionHandle
$error = null;

if ($request->getMethod() === 'POST' && $username = $request->get('username')) {

$user = User::getByName($username);
if (!$user instanceof User) {
$error = 'user_unknown';
Expand All @@ -190,7 +189,7 @@ public function lostpasswordAction(Request $request, ?BruteforceProtectionHandle
} catch (\Exception $e) {
$error = 'user_reset_password_too_many_attempts';
}
}else{
} else {
$limiter = $resetPasswordLimiter->create($request->getClientIp());

if (false === $limiter->consume(1)->isAccepted()) {
Expand Down Expand Up @@ -248,12 +247,13 @@ public function lostpasswordAction(Request $request, ?BruteforceProtectionHandle

$csrfProtection->regenerateCsrfToken();

if ($error){
if ($error) {
$params['reset_error'] = 'Please make sure you are entering a correct input.';
if ($error === 'user_reset_password_too_many_attempts') {
$params['reset_error'] = 'Too many attempts. Please retry later.';
}
}

return $this->render('@PimcoreAdmin/Admin/Login/lostpassword.html.twig', $params);
}

Expand Down

0 comments on commit 266c5b7

Please sign in to comment.