public function regenerateTokenAuth($userLogin)
    {
        $this->checkUserIsNotAnonymous($userLogin);

        Piwik::checkUserHasSuperUserAccessOrIsTheUser($userLogin);

        $this->model->updateUserTokenAuth(
            $userLogin,
            $this->createTokenAuth($userLogin)
        );
    }
public function regenerateTokenAuth($userLogin)
    {
        $this->checkUserIsNotAnonymous($userLogin);

        Piwik::checkUserHasSuperUserAccessOrIsTheUser($userLogin);

        $this->model->updateUserTokenAuth(
            $userLogin,
            $this->createTokenAuth($userLogin)
        );
    }
public function regenerateTokenAuth ( $ userLogin ) { $ this -> checkUserIsNotAnonymous ( $ userLogin ) ; Piwik :: checkUserHasSuperUserAccessOrIsTheUser ( $ userLogin ) ; $ this -> model -> updateUserTokenAuth ( $ userLogin , $ this -> createTokenAuth ( $ userLogin ) ) ; }
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
Regenerate the token_auth associated with a user .