Note that this returns the token_auth which is as private as the password!
public getUsersHavingSuperUserAccess ( ) : array[] | ||
리턴 | array[] | containing login, email and token_auth |
public function getCronArchiveTokenAuth(&$tokens) { $model = new Model(); $superUsers = $model->getUsersHavingSuperUserAccess(); foreach ($superUsers as $superUser) { $tokens[] = $superUser['token_auth']; } }
public function getCronArchiveTokenAuth(&$token) { $model = new Model(); $superUsers = $model->getUsersHavingSuperUserAccess(); if (!empty($superUsers)) { $superUser = array_shift($superUsers); $token = $superUser['token_auth']; } }
/** * 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; }
/** * 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; }
/** * 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; }
/** * Returns a list of all Super Users containing there userLogin and email address. * * @return array */ public function getUsersHavingSuperUserAccess() { Piwik::checkUserIsNotAnonymous(); return $this->model->getUsersHavingSuperUserAccess(); }