updateUserTokenAuth() public method

public updateUserTokenAuth ( $userLogin, $tokenAuth )
Example #1
0
File: API.php Project: piwik/piwik
 /**
  * Regenerate the token_auth associated with a user.
  *
  * If the user currently logged in regenerates his own token, he will be logged out.
  * His previous token will be rendered invalid.
  *
  * @param   string  $userLogin
  * @throws  Exception
  */
 public function regenerateTokenAuth($userLogin)
 {
     $this->checkUserIsNotAnonymous($userLogin);
     Piwik::checkUserHasSuperUserAccessOrIsTheUser($userLogin);
     $this->model->updateUserTokenAuth($userLogin, $this->createTokenAuth($userLogin));
 }