Beispiel #1
0
 protected function startup()
 {
     parent::startup();
     if ($this->user->isLoggedIn()) {
         $this->redirect('Homepage:');
     }
 }
Beispiel #2
0
 protected function startup()
 {
     parent::startup();
     if (!$this->user->isLoggedIn()) {
         $this->redirect('Login:default');
     }
 }
 public function beforeRender()
 {
     parent::beforeRender();
     $this->template->picturecount = $this->pictures->countBy();
     $this->template->tagcount = $this->tags->countBy();
     $this->template->usercount = $this->users->countBy();
     $this->template->pagecount = $this->pages->countBy();
     if (!$this->user->isAllowed('Admin:Admin', Model\Authorizator::READ)) {
         $this->flashMessage('Nacházíte se v **demo** ukázce administrace. Máte právo prohlížet, nikoliv však editovat...', 'info');
     }
 }