code cleanup

This commit is contained in:
Kevin Papst
2018-01-05 10:41:32 +01:00
parent cd4e65a17b
commit 43f6a9cced
2 changed files with 9 additions and 14 deletions

View File

@@ -1,10 +1,9 @@
Contributing Contributing
============ ============
The Symfony Demo application is an open source project. Contributions made by The Kimai application is an open source project. Contributions made by
the community are welcome. Send us your ideas, code reviews, pull requests and the community are welcome. Send us your ideas, code reviews, pull requests and
feature requests to help us improve this project. All contributions must follow feature requests to help us improve this project.
the [usual Symfony contribution requirements](http://symfony.com/doc/current/contributing/index.html).
Web Assets Management Web Assets Management
--------------------- ---------------------

View File

@@ -1,9 +1,9 @@
<?php <?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 * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
@@ -12,15 +12,11 @@
namespace AppBundle\Controller; namespace AppBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
/** /**
* Controller used to manage the application security. * Controller used to manage the application security.
* See http://symfony.com/doc/current/cookbook/security/form_login_setup.html. * 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 class SecurityController extends Controller
{ {
@@ -31,11 +27,8 @@ class SecurityController extends Controller
{ {
$helper = $this->get('security.authentication_utils'); $helper = $this->get('security.authentication_utils');
//return $this->render('AvanzuAdminThemeBundle:Security:login.html.twig', [
return $this->render('security/login.html.twig', [ return $this->render('security/login.html.twig', [
// last username entered by the user (if any)
'last_username' => $helper->getLastUsername(), 'last_username' => $helper->getLastUsername(),
// last authentication error (if any)
'error' => $helper->getLastAuthenticationError(), 'error' => $helper->getLastAuthenticationError(),
]); ]);
} }
@@ -43,8 +36,11 @@ class SecurityController extends Controller
/** /**
* This is the route the user can use to logout. * This is the route the user can use to logout.
* *
* But, this will never be executed. Symfony will intercept this first * The route needs to exist!
* and handle the logout automatically. See logout in app/config/security.yml * 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") * @Route("/logout", name="security_logout")
*/ */