IMPERSONATE !== false) return $this->IMPERSONATE; return !empty($_SERVER['REMOTE_USER']); } public function login($what = null, $ever = null) { throw new NS\AuthenticationException('login/logout not supported'); } public function logout($clearIdentity = false) { throw new NS\AuthenticationException('login/logout not supported'); } public function getIdentity() { if($this->IMPERSONATE !== false) return $this->IMPERSONATE; $remote_user = $_SERVER['REMOTE_USER']; $storage = $this->storage; $id = $storage->getIdentity(); if(!$id && !empty($remote_user)) { $id = new Nette\Security\Identity($remote_user); $storage->setIdentity($id); } return $id; } }