Skip to content

Commit

Permalink
AdminPresenterTrait: typos
Browse files Browse the repository at this point in the history
  • Loading branch information
pepakriz committed Oct 10, 2014
1 parent 01f4149 commit 1d9460c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/System/AdminPresenterTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,13 @@ public function checkRequirements($element)

// check login
if ($this->secured && !$this->getUser()->isLoggedIn()) {
if ($this->getName() != 'Admin:System:Login') {
if ($this->getName() !== 'Admin:System:Login') {
if ($this->getUser()->getLogoutReason() === \Nette\Security\IUserStorage::INACTIVITY) {
$this->flashMessage($this->getTranslator()->translate('You have been logged out due to inactivity. Please login again.'), 'info');
}

$this->forward(':Admin:System:Login:', array('backlink' => $this->storeRequest()));
}
if ($this->getUser()->logoutReason === \Nette\Security\IUserStorage::INACTIVITY) {
$this->flashMessage($this->translator->translate('You have been logged out due to inactivity. Please login again.'), 'info');
}
}

if ($this->getParameter('do') === null) {
Expand All @@ -165,7 +166,7 @@ public function handleLogout()
$this->redrawControl('title');
}

$this->redirect(':' . $this->administrationManager->defaultPresenter . ':');
$this->redirect(':Admin:' . $this->administrationManager->defaultPresenter . ':');
}

/**
Expand Down

0 comments on commit 1d9460c

Please sign in to comment.