]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/twitapiusers.php
Merge branch '0.7.x' into 0.8.x
[quix0rs-gnu-social.git] / actions / twitapiusers.php
index a47fdfbc38d0f8b2e0c1c0a6a520e3b76433cd6b..fea41b3971d3f9a77b342e6304f6e83e96fa6784 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  * Laconica - a distributed open-source microblogging tool
- * Copyright (C) 2008, Controlez-Vous, Inc.
+ * Copyright (C) 2008, 2009, Control Yourself, Inc.
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
@@ -17,7 +17,9 @@
  * along with this program.     If not, see <http://www.gnu.org/licenses/>.
  */
 
-if (!defined('LACONICA')) { exit(1); }
+if (!defined('LACONICA')) {
+    exit(1);
+}
 
 require_once(INSTALLDIR.'/lib/twitterapi.php');
 
@@ -41,10 +43,10 @@ class TwitapiusersAction extends TwitterapiAction
         if ($email) {
             $user = User::staticGet('email', $email);
         } else {
-            $user = $this->get_user($apidata['api_arg']);
+            $user = $this->get_user($apidata['api_arg'], $apidata);
         }
 
-        if (!$user) {
+        if (empty($user)) {
             $this->clientError(_('Not found.'), 404, $apidata['content-type']);
             return;
         }
@@ -56,7 +58,7 @@ class TwitapiusersAction extends TwitterapiAction
             return;
         }
 
-        $twitter_user = $this->twitter_user_array($profile, true);
+        $twitter_user = $this->twitter_user_array($user->getProfile(), true);
 
         if ($apidata['content-type'] == 'xml') {
             $this->init_document('xml');