public function startup() { parent::startup(); $session = $this->getSession('mysection'); $session->user = '******'; dump($session); }
protected function startup() { parent::startup(); if (!$this->user->isInRole(UserManager::ROLE_ADMIN)) { throw new BadRequestException(); } }
public function startup() { parent::startup(); if ($this->user->loggedIn) { $this->redirect('Admin:directives'); } }
public function startup() { parent::startup(); if (!$this->user->isAllowed('Admin', 'can')) { throw new \Nette\Application\ForbiddenRequestException(); } }
protected function startup() { parent::startup(); if (!$this->user->loggedIn) { $this->redirect('Homepage:'); } }
public function startup() { parent::startup(); // if (!$this->user->isLoggedIn()) { // $this->redirect('Sign:in'); // } }
protected function startup() { parent::startup(); if (!$this->user->isLoggedIn()) { $this->redirect('Login:'); } }
protected function startup() { parent::startup(); $this->oModel = $this->context->getService("article"); $this->oMenu = $this->context->getService("menu"); $this->oUser = $this->context->getService("userss"); }
public function startup() { parent::startup(); if (!$this->getUser()->isLoggedIn()) { $this->redirect('Sign:in', array('backlink' => $this->storeRequest())); } }
protected function startup() { if (!$this->getUser()->isLoggedIn()) { $this->redirect(':Sign:in'); } parent::startup(); }
public function startup() { parent::startup(); // TODO: Change the autogenerated stub $this->steelCheck('Pro správu tagů musíš být přihlášen.', []); $this->template->title = 'Tagy'; }
public function startup() { parent::startup(); if (!$this->getRequest()->isMethod(Nette\Application\Request::FORWARD)) { $this->error(); } }
public function startup() { parent::startup(); if (!$this->user->isInRole('admin')) { $this->flashMessage('Pro přístup do sekce "nástroje" musíte být přihlášen jako uživatel s administrátorskými právy.', 'fr'); $this->redirect('Sign:in'); } }
/** MapPresenter constructor*/ protected function startUp() { parent::startup(); if (!$this->user->isLoggedIn()) { $this->flashMessage('Pro přístup k mapám je nutné se přihlásit.', 'danger'); $this->redirect('Login:'); } }
public function startup() { parent::startup(); if (!$this->getUser()->isLoggedIn()) { $this->flashMessage("Pro vstup do této sekce je vyžadováno přihlášení."); $this->redirect(":Homepage:"); } }
public function startup() { parent::startup(); // TODO: Change the autogenerated stub if (!$this->session->isStarted()) { $this->session->start(); } }
protected function startup() { parent::startup(); $parameters = $this->context->parameters; $this->appDir = $parameters['appDir']; $this->contactEmail = $parameters['contactEmail']; $this->registerFormExtendingMethods(); }
/** * Verify token. */ public function startup() { parent::startup(); $token = $this->getParameter('token'); if (!$this->usersRepository->verifyToken($token)) { $this->flashMessage('The token is invalid.', 'alert alert-danger'); $this->redirect('LogIn:default'); } }
public function startup() { parent::startup(); if (!$this->user->isLoggedIn()) { $this->flashMessage("To access Steel, you must be Steel."); $this->redirect('Sign:in'); } $this->template->title = "Steelasdf"; }
public function startup() { parent::startup(); if (!$this->user->isInRole('admin')) { $this->flashMessage('Akci nelze provést, protože nemáte oprávnění administrátora. ' . 'Přihlaste se administrátorským účtem.', 'error'); $this->redirect("Sign:in", array('backlink' => $this->storeRequest())); } $this->formLatteAddress = __DIR__ . "/../templates/form.latte"; }
public function startup() { parent::startup(); if ($this->user->isLoggedIn()) { if ($this->getParameter('id') != $this->user->getId()) { $this->redirect('Sign:in'); } } }
protected function startup() { parent::startup(); //.... // get settings $this->settings = $this->settingRepository->getSettings(); $arrsdfsdfsdf = ['AoAco' => 'asdas', 'naeco' => 'asdas', 'naecaovbnm' => 'asdas']; $arrr = ['a' => '4', 'b' => 'c']; $a = ['a' => 1]; }
public function startup() { parent::startup(); if (!$this->user->loggedIn) { $this->redirect("Sign:in", ["backlink" => $this->storeRequest()]); } $this->translator->setLocale("en"); if ($this->getParameter("no_layout", false)) { $this->setLayout(false); } }
public function startup() { parent::startup(); if (!$this->user->loggedIn) { $this->flashMessage('Zabezpečená sekce. Přihlašte se prosím.', 'error'); $this->redirect('Public:directives'); } $this->docExt = $this->context->parameters['docExt']; $this->setPostLimit(); $this->setFileLimit(); $this->checkPostLimit(); }
/** * For Logged and verified */ public function startup() { parent::startup(); if (!$this->user->isLoggedIn()) { $this->flashMessage($this->translator->translate('ui.you-must-by-logged-log-in-please'), 'alert alert-info'); $this->redirect('LogIn:default'); } if ($this->user->isInRole('unverified')) { $this->flashMessage('ui.you-must-by-verified-please-verify-your-account', 'alert alert-warning'); $this->redirect('LogIn:default'); } }
public function startup() { parent::startup(); $user = $this->getUser(); if (!$user->isLoggedIn()) { if ($user->getLogoutReason() === User::INACTIVITY) { //$this->flashMessage($this->tt("securityModule.loginControl.messages.outCosInactive"), self::FM_WARNING); } $backlink = $this->storeRequest(); $this->redirect(':Security:Auth:in', ['backlink' => $backlink]); } }
public function startup() { parent::startup(); if (!$this->user->isLoggedIn()) { $this->redirect(':Sign:in'); } $this->identity = $this->user->identity; $this->userEntity = $this->userService->get($this->identity->id); $this->navigation = new NavigationCollection($this->translator); $this->template->navigation = $this->navigation; $this->template->systemName = systemName; $this->template->author = $this->userEntity->getEmail(); }
public function startup() { parent::startup(); if (!$this->user->isLoggedIn()) { if (!($this->getName() == 'AdminUser' && $this->getAction() == 'login')) { $this->redirectUrl($this->genUrl('admin/prihlasit')); } } else { if ($this->getName() == 'AdminUser' && $this->getAction() == 'login') { $this->redirectUrl($this->genUrl('admin')); } } }
/** * */ protected function startup() { parent::startup(); if (!$this->user->isLoggedIn() || !$this->user->isInRole('admin')) { $this->flashMessage('Ke vstupu do administrace nemáte oprávnění!', 'danger'); $this->redirect('Sign:in'); } $explode = explode(':', $this->presenter->name); $pieces = preg_split('/(?=[A-Z])/', lcfirst(end($explode))); $presenterName = strtolower(implode('_', $pieces)); $this->tableName = strtolower($presenterName); $this->formFactory->setPresenter($this); $this->gridFactory->setPresenter($this); }
public function startup() { parent::startup(); Gallery::extensionMethod('getImages', function (Gallery $gallery) { return $this->gallery->getImages($gallery->idGallery, $gallery->lang); }); //todo: Metoda getImages vrace pouze pole a ne callback? Gallery::extensionMethod('getImage', function (Gallery $gallery) { foreach ($this->gallery->getImages($gallery->idGallery, $gallery->lang) as $path => $image) { return $path; } }); $this->setActive('Galerie'); }