protected function startup() { parent::startup(); // Kontrola ACL if (!$this->user->isAllowed($this->name, $this->action)) { $this->flashRedirect('Homepage:', sprintf($this->trLang('base_nie_je_opravnenie'), $this->action), 'danger'); } if ($this->user->isLoggedIn()) { $this->flashRedirect('Homepage:', $this->trLang('base_loged_in_bad'), 'danger'); } $this->hasser = $this->user->getAuthenticator(); //Ziskanie objektu pre vytvaranie hash hesla a iných $this->hasser->PasswordHash(8, FALSE); //Nastavenie $this->template->form_required = $this->trLang('base_form_required'); $this->template->h2 = $this->trLang('h2_' . $this->action); //Nacitanie hlavneho nadpisu $this->clen = $this->user_profiles->find(1); //Odosielatel e-mailu $this->user_view_fields = $this->nastavenie['user_view_fields']; }
protected function startup() { parent::startup(); if ($this->action != 'activateNewEmail') { if (!$this->user->isLoggedIn()) { //Neprihlaseneho presmeruj $this->flashRedirect(['User:'******'backlink' => $this->storeRequest()]], $this->trLang('base_nie_je_opravnenie1') . '<br/>' . $this->trLang('base_prihlaste_sa'), 'danger,n'); } } // Kontrola ACL if (!$this->user->isAllowed($this->name, $this->action)) { $this->flashRedirect('Homepage:', sprintf($this->trLang('base_nie_je_opravnenie'), $this->action), 'danger'); } //Najdem aktualne prihlaseneho clena $this->clen = $this->user_profiles->findOneBy(['id_users' => $this->user->getIdentity()->getId()]); $this->hasser = $this->user->getAuthenticator(); //Ziskanie objektu pre vytvaranie hash hesla a iných $this->hasser->PasswordHash(8, FALSE); //Nastavenie $this->user_view_fields = $this->nastavenie['user_view_fields']; }