Skip to content

Commit

Permalink
[HOTFIX] get message error in page login
Browse files Browse the repository at this point in the history
  • Loading branch information
Chrysweel committed Mar 18, 2015
1 parent 618f50a commit 07db374
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Controller/SecuredController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class SecuredController extends Controller
public function loginAction(Request $request)
{
$securityContext = $this->container->get('security.context');
if ($securityContext->isGranted('IS_AUTHENTICATED_FULLY')) {
if ($securityContext->isGranted('IS_AUTHENTICATED_FULLY') && $this->get('security.context')->isGranted('IS_AUTHENTICATED_REMEMBERED')) {
return $this->redirect("/");
}

Expand All @@ -25,7 +25,9 @@ public function loginAction(Request $request)
$error = $request->getSession()->get(SecurityContext::AUTHENTICATION_ERROR);
}

$error = $this->extractAuthErrorI18N($error);
if ($error){
$error = $this->extractAuthErrorI18N($error);
}

return $this->render('ChateaSecureBundle:Secured:login.html.twig',array(
'last_username' => $request->getSession()->get(SecurityContext::LAST_USERNAME),
Expand Down

0 comments on commit 07db374

Please sign in to comment.