2021-04-06 19:33:20 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
namespace JeroenED\Webcron\Controller;
|
|
|
|
|
|
|
|
use JeroenED\Framework\Controller;
|
2021-04-06 23:19:51 +02:00
|
|
|
use Symfony\Component\HttpFoundation\RedirectResponse;
|
2021-04-06 19:33:20 +02:00
|
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
|
|
|
|
|
|
class SecurityController extends Controller
|
|
|
|
{
|
|
|
|
public function loginAction(): Response
|
|
|
|
{
|
2021-04-06 23:19:51 +02:00
|
|
|
if(isset($_SESSION['isAuthenticated']) && $_SESSION['isAuthenticated']) {
|
|
|
|
return new RedirectResponse($this->generateRoute('default'));
|
|
|
|
}
|
2021-04-06 19:33:20 +02:00
|
|
|
return $this->render('security/login.html.twig');
|
|
|
|
}
|
|
|
|
}
|