protected function startup() { parent::startup(); if (!$this->user->isLoggedIn() or !$this->user->isInRole('user')) { $this->redirect('Sign:In'); } }
public function startup() { parent::startup(); if ($this->getUser()->isLoggedIn()) { $this->flashMessage("Přihlášený uživatel si nemůže vytvořit další účet.", "alert-danger"); $this->redirect("Homepage:default"); } }
public function startup() { parent::startup(); if ($this->getUser()->isLoggedIn()) { $this->flashMessage("Přihlášený uživatel si nemůže požádat o zapomenuté heslo.", "alert-danger"); $this->redirect("Homepage:default"); } }
protected function startup() { parent::startup(); $this->horninaRepository = $this->context->horninaRepository; $this->horninaObrazokRepository = $this->context->horninaObrazokRepository; }