]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Run onEndSetApiUser also when already logged in!
authorMikael Nordfeldth <mmn@hethane.se>
Sat, 31 Jan 2015 15:02:01 +0000 (16:02 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Sat, 31 Jan 2015 15:02:01 +0000 (16:02 +0100)
lib/apiauthaction.php

index 40161b7ab57c4a73cc25086961a61accd6fbd7bc..92e35695efd97f251603cc4f22cfbb5e35cd2f32 100644 (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();