src/AdminBundle/Controller/IndexController.php line 22

Open in your IDE?
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: laurentiu
  5. * Date: 10.10.2017
  6. * Time: 21:03
  7. */
  8. namespace AdminBundle\Controller;
  9. use AdminFOSUserBundle\Security\LoginSuccessHandler;
  10. use Doctrine\Common\Util\Debug;
  11. use Symfony\Component\HttpFoundation\RedirectResponse;
  12. use Symfony\Component\HttpFoundation\Request;
  13. class IndexController extends BaseController
  14. {
  15. public function indexAction(Request $request, LoginSuccessHandler $lsh) {
  16. if ($this->get('security.token_storage')->getToken()) {
  17. $response = $lsh->onAuthenticationSuccess($request, $this->get('security.token_storage')->getToken());
  18. }
  19. return $response ?? $response = new RedirectResponse($this->generateUrl('client_bounce'));
  20. }
  21. }