Skip to content

Commit

Permalink
Merge branch 'master' into 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jasongrimes committed Nov 1, 2014
2 parents dd96f42 + 0f6a92f commit e2f9c38
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/SimpleUser/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ public function confirmEmailAction(Application $app, Request $request, $token)
public function loginAction(Application $app, Request $request)
{
$authException = $app['user.last_auth_exception']($request);

if ($authException instanceof DisabledException) {
// This exception is thrown if (!$user->isEnabled())
// Warning: Be careful not to disclose any user information besides the email address at this point.
// The Security system throws this exception before actually checking if the password was valid.
$user = $this->userManager->refreshUser($authException->getUser());
Expand All @@ -188,7 +190,7 @@ public function loginAction(Application $app, Request $request)

return $app['twig']->render($this->getTemplate('login'), array(
'layout_template' => $this->getTemplate('layout'),
'error' => $authException ? $authException->getMessage() : null, // $app['security.last_error']($request),
'error' => $authException ? $authException->getMessageKey() : null,
'last_username' => $app['session']->get('_security.last_username'),
'allowRememberMe' => isset($app['security.remember_me.response_listener']),
'allowPasswordReset' => $this->isPasswordResetEnabled(),
Expand Down

0 comments on commit e2f9c38

Please sign in to comment.