From: Mikael Nordfeldth Date: Sat, 31 Jan 2015 15:02:01 +0000 (+0100) Subject: Run onEndSetApiUser also when already logged in! X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c7dd5959847218665762b0d4169b7528550d8a1d;p=quix0rs-gnu-social.git Run onEndSetApiUser also when already logged in! --- diff --git a/lib/apiauthaction.php b/lib/apiauthaction.php index 40161b7ab5..92e35695ef 100644 --- a/lib/apiauthaction.php +++ b/lib/apiauthaction.php @@ -93,6 +93,8 @@ class ApiAuthAction extends ApiAction // TRANS: Authorization exception thrown when a user without API access tries to access the API. throw new AuthorizationException(_('Not allowed to use API.')); } + // Let's run this in the same way as if we've just authenticated the user (basic/oauth auth) + Event::handle('EndSetApiUser', array($this->auth_user)); $this->access = self::READ_WRITE; } else { $oauthReq = $this->getOAuthRequest();