chill-bundles/Controller/LoginController.php

34 lines
948 B
PHP

<?php
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;
class LoginController extends Controller
{
/**
*
* @todo Improve this with http://symfony.com/blog/new-in-symfony-2-6-security-component-improvements#added-a-security-error-helper
* @param Request $request
* @return Response
*/
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()
));
}
public function LoginCheckAction(Request $request)
{
}
}