Run onEndSetApiUser also when already logged in!

This commit is contained in:
Mikael Nordfeldth 2015-01-31 16:02:01 +01:00
parent d1ac9a4b44
commit c7dd595984
1 changed files with 2 additions and 0 deletions

View File

@ -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();