Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/UsersManager/API.php')
-rwxr-xr-xplugins/UsersManager/API.php72
1 files changed, 36 insertions, 36 deletions
diff --git a/plugins/UsersManager/API.php b/plugins/UsersManager/API.php
index cb230e5f2d..2aad5956d5 100755
--- a/plugins/UsersManager/API.php
+++ b/plugins/UsersManager/API.php
@@ -1,17 +1,17 @@
-<?php
-/**
- * Piwik - Open source web analytics
- *
- * @link http://piwik.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later
- * @version $Id$
- *
- * @package Piwik_UsersManager
- */
+<?php
+/**
+ * Piwik - Open source web analytics
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later
+ * @version $Id$
+ *
+ * @package Piwik_UsersManager
+ */
-/**
- *
- * @package Piwik_UsersManager
+/**
+ *
+ * @package Piwik_UsersManager
*/
class Piwik_UsersManager_API extends Piwik_Apiable
{
@@ -181,7 +181,7 @@ class Piwik_UsersManager_API extends Piwik_Apiable
$user = $db->fetchRow("SELECT *
FROM ".Piwik::prefixTable("user")
." WHERE login = ?", $userLogin);
-// var_dump($user); exit;
+// var_dump($user); exit;
return $user;
}
@@ -224,8 +224,8 @@ class Piwik_UsersManager_API extends Piwik_Apiable
}
static private function getCleanPassword($password)
- {
- // if change here, should also edit the installation process
+ {
+ // if change here, should also edit the installation process
// to change how the root pwd is saved in the config file
return md5($password);
}
@@ -255,8 +255,8 @@ class Piwik_UsersManager_API extends Piwik_Apiable
$alias = self::getCleanAlias($alias,$userLogin);
$passwordTransformed = self::getCleanPassword($password);
-
- $token_auth = self::getTokenAuth($userLogin, $passwordTransformed);
+
+ $token_auth = self::getTokenAuth($userLogin, $passwordTransformed);
$db = Zend_Registry::get('db');
@@ -284,8 +284,8 @@ class Piwik_UsersManager_API extends Piwik_Apiable
*/
static public function updateUser( $userLogin, $password = false, $email = false, $alias = false )
{
- Piwik::checkUserIsSuperUserOrTheUser($userLogin);
- self::checkUserIsNotAnonymous( $userLogin );
+ Piwik::checkUserIsSuperUserOrTheUser($userLogin);
+ self::checkUserIsNotAnonymous( $userLogin );
$userInfo = self::getUser($userLogin);
@@ -339,13 +339,13 @@ class Piwik_UsersManager_API extends Piwik_Apiable
static public function deleteUser( $userLogin )
{
Piwik::checkUserIsSuperUser();
- self::checkUserIsNotAnonymous( $userLogin );
+ self::checkUserIsNotAnonymous( $userLogin );
if(!self::userExists($userLogin))
{
throw new Exception("User '$userLogin' doesn't exist therefore it can't be deleted.");
- }
-
+ }
+
self::deleteUserOnly( $userLogin );
self::deleteUserAccess( $userLogin );
@@ -385,12 +385,12 @@ class Piwik_UsersManager_API extends Piwik_Apiable
{
self::checkAccessType( $access );
self::checkUserExists( $userLogin);
-
- if($userLogin == 'anonymous'
- && $access == 'admin')
- {
- throw new Exception("You cannot grant 'admin' access to the 'anonymous' user.");
- }
+
+ if($userLogin == 'anonymous'
+ && $access == 'admin')
+ {
+ throw new Exception("You cannot grant 'admin' access to the 'anonymous' user.");
+ }
// in case idSites is null we grant access to all the websites on which the current connected user
// has an 'admin' access
@@ -444,13 +444,13 @@ class Piwik_UsersManager_API extends Piwik_Apiable
throw new Exception("User '$userLogin' doesn't exist.");
}
}
-
- static private function checkUserIsNotAnonymous( $userLogin )
- {
- if($userLogin == 'anonymous')
- {
- throw new Exception("The anonymous user cannot be edited or deleted. It is used by Piwik to define a user that has not loggued in yet. For example, you can make your statistics public by granting the 'view' access to the 'anonymous' user.");
- }
+
+ static private function checkUserIsNotAnonymous( $userLogin )
+ {
+ if($userLogin == 'anonymous')
+ {
+ throw new Exception("The anonymous user cannot be edited or deleted. It is used by Piwik to define a user that has not loggued in yet. For example, you can make your statistics public by granting the 'view' access to the 'anonymous' user.");
+ }
}
static private function checkAccessType($access)