diff options
author | mattpiwik <matthieu.aubry@gmail.com> | 2011-12-18 03:55:39 +0400 |
---|---|---|
committer | mattpiwik <matthieu.aubry@gmail.com> | 2011-12-18 03:55:39 +0400 |
commit | 8e4018c2b630fd44bd0fb76b66f971811c64749a (patch) | |
tree | 7c6e960f3cf3404f725f661000a811602aabe4af | |
parent | e08c1e5a0d2bde94aad16e0b599dfb5d0277e75d (diff) |
Fixes #2827 - Only the anonymous user cannot change emails/check if a user exists
git-svn-id: http://dev.piwik.org/svn/trunk@5559 59fd770c-687e-43c8-a1e3-f5a4ff64c105
-rw-r--r-- | plugins/UsersManager/API.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/UsersManager/API.php b/plugins/UsersManager/API.php index 204e1a0d5d..4c4e94b9cb 100644 --- a/plugins/UsersManager/API.php +++ b/plugins/UsersManager/API.php @@ -416,7 +416,7 @@ class Piwik_UsersManager_API $this->checkUserIsNotAnonymous( $userLogin ); $this->checkUserIsNotSuperUser($userLogin); $userInfo = $this->getUser($userLogin); - + if(empty($password)) { $password = $userInfo['password']; @@ -504,10 +504,10 @@ class Piwik_UsersManager_API */ public function userEmailExists( $userEmail ) { - Piwik::checkUserHasSomeAdminAccess(); + Piwik::checkUserIsNotAnonymous(); $count = Piwik_FetchOne("SELECT count(*) - FROM ".Piwik_Common::prefixTable("user"). " - WHERE email = ?", $userEmail); + FROM ".Piwik_Common::prefixTable("user"). " + WHERE email = ?", $userEmail); return $count != 0; } |