Don't use Icinga\Authentication\Manager twice

This commit is contained in:
Eric Lippmann 2015-03-11 22:01:41 +01:00
parent 9e81370551
commit dfa7e20b74
1 changed files with 3 additions and 6 deletions

View File

@ -5,7 +5,6 @@ namespace Icinga\Application;
require_once __DIR__ . '/ApplicationBootstrap.php'; require_once __DIR__ . '/ApplicationBootstrap.php';
use Icinga\Authentication\Manager as AuthenticationManager;
use Icinga\Authentication\Manager; use Icinga\Authentication\Manager;
use Icinga\Application\Logger; use Icinga\Application\Logger;
use Icinga\Util\TimezoneDetect; use Icinga\Util\TimezoneDetect;
@ -181,12 +180,10 @@ class Web extends ApplicationBootstrap
*/ */
private function setupUser() private function setupUser()
{ {
$authenticationManager = AuthenticationManager::getInstance(); $auth = Manager::getInstance();
if ($auth->isAuthenticated() === true) {
if ($authenticationManager->isAuthenticated() === true) { $this->user = $auth->getUser();
$this->user = $authenticationManager->getUser();
} }
return $this; return $this;
} }