diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-04-17 07:53:44 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-04-17 07:53:44 +0400 |
commit | a75372f61fd96472bc13e02effce92ffa160df4e (patch) | |
tree | c2d33b6e284a02ae41ce3f492ff3993c44078fb7 /core/Access.php | |
parent | 7b739c2d7847f9f14e993f46df94318f17dd5313 (diff) |
Refs #5004 remove unused code
Diffstat (limited to 'core/Access.php')
-rw-r--r-- | core/Access.php | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/core/Access.php b/core/Access.php index 6ee5d7756a..71a5dd5f33 100644 --- a/core/Access.php +++ b/core/Access.php @@ -37,11 +37,6 @@ class Access private static $instance = null; /** - * @var string - */ - private $previousLogin; - - /** * Gets the singleton instance. Creates it if necessary. */ public static function getInstance() @@ -227,7 +222,6 @@ class Access public function setSuperUserAccess($bool = true) { if ($bool) { - $this->previousLogin = self::getLogin(); $this->reloadAccessSuperUser(); } else { $this->hasSuperUserAccess = false; @@ -266,27 +260,6 @@ class Access return $this->token_auth; } - protected function getAnySuperUserAccessLogin() - { - try { - $superUsers = APIUsersManager::getInstance()->getUsersHavingSuperUserAccess(); - } catch (\Exception $e) { - return; - } - - if (empty($superUsers)) { - return; - } - - $firstSuperUser = array_shift($superUsers); - - if (empty($firstSuperUser)) { - return; - } - - return $firstSuperUser['login']; - } - /** * Returns an array of ID sites for which the user has at least a VIEW access. * Which means VIEW or ADMIN or SUPERUSER. @@ -433,13 +406,6 @@ class Access } return $idSites; } - - private function setAnySuperUserLoginIfCurrentUserHasNotSuperUserAccess() - { - if (!Piwik::hasTheUserSuperUserAccess($this->login) || Piwik::isUserIsAnonymous()) { - $this->login = $this->getAnySuperUserAccessLogin(); - } - } } /** |