Ajuste cliente

parent 7617edbe
<?php
namespace App\BackendBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
use App\Utilities\Utiles;
class SecurityController extends AbstractController
{
public function login(AuthenticationUtils $authenticationUtils): Response
{
$log = Utiles::setLog('App\BackendBundle\Controller::SecurityController::login', 'app/login');
// get the login error if there is one
$error = $authenticationUtils->getLastAuthenticationError();
// last username entered by the user
$lastUsername = $authenticationUtils->getLastUsername();
$log->debug("Haciendo login...");
return $this->render('security/login.html.twig', ['last_username' => $lastUsername, 'error' => $error]);
}
public function redirectLogin(){
$log = Utiles::setLog('App\BackendBundle\Controller::SecurityController::redirectLogin', 'app/login');
$log->debug("Redireccionando al login...");
return $this->redirectToRoute('app_login');
}
}
<?php
namespace App\BackendBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
use App\Utilities\Utiles;
class SecurityController extends AbstractController
{
public function login(AuthenticationUtils $authenticationUtils): Response{
$log = Utiles::setLog('App\BackendBundle\Controller::SecurityController::login', 'app/login');
/*// get the login error if there is one
$error = $authenticationUtils->getLastAuthenticationError();
// last username entered by the user
$lastUsername = $authenticationUtils->getLastUsername();
$log->debug("Haciendo login...");
return $this->render('security/login.html.twig', ['last_username' => $lastUsername, 'error' => $error]);
*/
$log->debug("Redireccionando al front...");
//return $this->redirectToRoute('app_login');
return $this->redirectToRoute('front_index');
}
public function redirectLogin(){
$log = Utiles::setLog('App\BackendBundle\Controller::SecurityController::redirectLogin', 'app/login');
$log->debug("Redireccionando al front...");
//return $this->redirectToRoute('app_login');
return $this->redirectToRoute('front_index');
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment