Auth2FA/app/Core/AppPresenter.php

26 lines
429 B
PHP

<?php
declare(strict_types=1);
namespace App\Core;
use Nette;
/**
* Base presenter, který vyžaduje přihlášení uživatele.
*/
class AppPresenter extends Nette\Application\UI\Presenter
{
public function __construct(
) {
}
public function startup(): void
{
parent::startup();
if (!$this->getUser()->isLoggedIn()) {
$this->redirect(':Sign:in', ['backlink' => $this->storeRequest()]);
}
}
}