Skip to content

Commit

Permalink
To fix #75
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Richer [email protected] <[email protected]>
  • Loading branch information
visto9259 committed Jun 26, 2024
1 parent 33e1ed1 commit f11b0a2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Controller/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,12 @@ public function loginAction()
$form->setData($request->getPost());

if (!$form->isValid()) {
$this->flashMessenger()->setNamespace('lmcuser-login-form')->addMessage($this->failedLoginMessage);
return $this->redirect()->toUrl($this->url()->fromRoute(static::ROUTE_LOGIN).($redirect ? '?redirect='. rawurlencode($redirect) : ''));
// return the view again
return array(
'loginForm' => $form,
'redirect' => $redirect,
'enableRegistration' => $this->getOptions()->getEnableRegistration(),
);
}

// clear adapters
Expand Down Expand Up @@ -434,7 +438,7 @@ public function getOptions()
/**
* Get changeEmailForm.
*
* @return ChangeEmailForm
* @return FormInterface
*/
public function getChangeEmailForm()
{
Expand Down

0 comments on commit f11b0a2

Please sign in to comment.