code cleanup
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
* This file is part of the Kimai package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
* (c) Kevin Papst <kevin@kevinpapst.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -12,15 +12,11 @@
|
||||
namespace AppBundle\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
|
||||
/**
|
||||
* Controller used to manage the application security.
|
||||
* See http://symfony.com/doc/current/cookbook/security/form_login_setup.html.
|
||||
*
|
||||
* @author Ryan Weaver <weaverryan@gmail.com>
|
||||
* @author Javier Eguiluz <javier.eguiluz@gmail.com>
|
||||
*/
|
||||
class SecurityController extends Controller
|
||||
{
|
||||
@@ -31,11 +27,8 @@ class SecurityController extends Controller
|
||||
{
|
||||
$helper = $this->get('security.authentication_utils');
|
||||
|
||||
//return $this->render('AvanzuAdminThemeBundle:Security:login.html.twig', [
|
||||
return $this->render('security/login.html.twig', [
|
||||
// last username entered by the user (if any)
|
||||
'last_username' => $helper->getLastUsername(),
|
||||
// last authentication error (if any)
|
||||
'error' => $helper->getLastAuthenticationError(),
|
||||
]);
|
||||
}
|
||||
@@ -43,8 +36,11 @@ class SecurityController extends Controller
|
||||
/**
|
||||
* This is the route the user can use to logout.
|
||||
*
|
||||
* But, this will never be executed. Symfony will intercept this first
|
||||
* and handle the logout automatically. See logout in app/config/security.yml
|
||||
* The route needs to exist!
|
||||
* It could be configured in the routes.yml as well, but having it here in one place seemed to be the better was.
|
||||
*
|
||||
* The code will never be executed. Symfony will intercept this request and handle the logout automatically.
|
||||
* See logout in app/config/security.yml
|
||||
*
|
||||
* @Route("/logout", name="security_logout")
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user