getUsersHavingSuperUserAccess() public method

Note that this returns the token_auth which is as private as the password!
public getUsersHavingSuperUserAccess ( ) : array[]
return array[] containing login, email and token_auth
Example #1
0
 public function getCronArchiveTokenAuth(&$tokens)
 {
     $model = new Model();
     $superUsers = $model->getUsersHavingSuperUserAccess();
     foreach ($superUsers as $superUser) {
         $tokens[] = $superUser['token_auth'];
     }
 }
Example #2
0
 public function getCronArchiveTokenAuth(&$token)
 {
     $model = new Model();
     $superUsers = $model->getUsersHavingSuperUserAccess();
     if (!empty($superUsers)) {
         $superUser = array_shift($superUsers);
         $token = $superUser['token_auth'];
     }
 }
Example #3
0
File: API.php Project: piwik/piwik
 /**
  * Returns a list of all Super Users containing there userLogin and email address.
  *
  * @return array
  */
 public function getUsersHavingSuperUserAccess()
 {
     Piwik::checkUserIsNotAnonymous();
     $users = $this->model->getUsersHavingSuperUserAccess();
     $users = $this->enrichUsers($users);
     // we do not filter these users by access and return them all since we need to print this information in the
     // UI and they are allowed to see this.
     return $users;
 }
Example #4
0
 /**
  * Returns a list of all Super Users containing there userLogin and email address.
  *
  * @return array
  */
 public function getUsersHavingSuperUserAccess()
 {
     Piwik::checkUserIsNotAnonymous();
     $users = $this->model->getUsersHavingSuperUserAccess();
     foreach ($users as &$user) {
         // remove token_auth in API response
         unset($user['token_auth']);
     }
     return $users;
 }
Example #5
0
 /**
  * Returns a list of all Super Users containing there userLogin and email address.
  *
  * @return array
  */
 public function getUsersHavingSuperUserAccess()
 {
     Piwik::checkUserIsNotAnonymous();
     $users = $this->model->getUsersHavingSuperUserAccess();
     foreach ($users as &$user) {
         // remove token_auth in API response
         unset($user['token_auth']);
     }
     // we do not filter these users by access and return them all since we need to print this information in the
     // UI and they are allowed to see this.
     return $users;
 }
Example #6
0
 /**
  * Returns a list of all Super Users containing there userLogin and email address.
  *
  * @return array
  */
 public function getUsersHavingSuperUserAccess()
 {
     Piwik::checkUserIsNotAnonymous();
     return $this->model->getUsersHavingSuperUserAccess();
 }