mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 02:23:51 +00:00
fix authentication error message
This commit is contained in:
@@ -5,10 +5,21 @@ namespace Chill\MainBundle\Controller;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Security\Core\SecurityContextInterface;
|
||||
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
|
||||
|
||||
class LoginController extends Controller
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @var AuthenticationUtils
|
||||
*/
|
||||
protected $helper;
|
||||
|
||||
public function __construct(AuthenticationUtils $helper)
|
||||
{
|
||||
$this->helper = $helper;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a login form
|
||||
*
|
||||
@@ -17,11 +28,10 @@ class LoginController extends Controller
|
||||
*/
|
||||
public function loginAction(Request $request)
|
||||
{
|
||||
$helper = $this->get('security.authentication_utils');
|
||||
|
||||
return $this->render('ChillMainBundle:Login:login.html.twig', array(
|
||||
'last_username' => $helper->getLastUsername(),
|
||||
'error' => $helper->getLastAuthenticationError()
|
||||
'last_username' => $this->helper->getLastUsername(),
|
||||
'error' => $this->helper->getLastAuthenticationError()
|
||||
));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user