]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/apiauth.php
Tidying up getUser calls to profiles and some events
[quix0rs-gnu-social.git] / lib / apiauth.php
index ecb206bab1b58172684bd654fa81eabe723d3f75..499c50248032eee1e677a7a3cb8fe3028d7626ef 100644 (file)
@@ -103,6 +103,13 @@ class ApiAuthAction extends ApiAction
             $this->checkOAuthRequest($oauthReq);
         }
 
+        // NOTE: Make sure we're scoped properly based on the auths!
+        if (isset($this->auth_user) && !empty($this->auth_user)) {
+            $this->scoped = $this->auth_user->getProfile();
+        } else {
+            $this->scoped = null;
+        }
+
         // Reject API calls with the wrong access level
 
         if ($this->isReadOnly($args) == false) {