From 4b7c8c2e24aba8e66e58887764c0dbb7926adfbc Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 8 Apr 2014 17:18:14 +0200 Subject: [PATCH] [Book][Security] constants are defined in the SecurityContextInterface --- book/security.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/book/security.rst b/book/security.rst index b1e7aebbe75..fb5a0729733 100644 --- a/book/security.rst +++ b/book/security.rst @@ -436,7 +436,7 @@ Next, create the controller that will display the login form:: use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; - use Symfony\Component\Security\Core\SecurityContext; + use Symfony\Component\Security\Core\SecurityContextInterface; class SecurityController extends Controller { @@ -445,20 +445,20 @@ Next, create the controller that will display the login form:: $session = $request->getSession(); // get the login error if there is one - if ($request->attributes->has(SecurityContext::AUTHENTICATION_ERROR)) { + if ($request->attributes->has(SecurityContextInterface::AUTHENTICATION_ERROR)) { $error = $request->attributes->get( - SecurityContext::AUTHENTICATION_ERROR + SecurityContextInterface::AUTHENTICATION_ERROR ); } else { - $error = $session->get(SecurityContext::AUTHENTICATION_ERROR); - $session->remove(SecurityContext::AUTHENTICATION_ERROR); + $error = $session->get(SecurityContextInterface::AUTHENTICATION_ERROR); + $session->remove(SecurityContextInterface::AUTHENTICATION_ERROR); } return $this->render( 'AcmeSecurityBundle:Security:login.html.twig', array( // last username entered by the user - 'last_username' => $session->get(SecurityContext::LAST_USERNAME), + 'last_username' => $session->get(SecurityContextInterface::LAST_USERNAME), 'error' => $error, ) ); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy