]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/twitapiusers.php
Update copyright dates in files modified in 2009
[quix0rs-gnu-social.git] / actions / twitapiusers.php
index b90bbfa985c9a6a381a5397647b54518225e6768..4057b63e740527d82f5624b78eea2e3d56491d0e 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');
 
@@ -51,19 +53,12 @@ class TwitapiusersAction extends TwitterapiAction
             $user = $apidata['user'];
         }
 
-        if (!$user) {
+        if (empty($user)) {
             $this->client_error(_('Not found.'), 404, $apidata['content-type']);
             return;
         }
 
-        $profile = $user->getProfile();
-
-        if (!$profile) {
-            common_server_error(_('User has no profile.'));
-            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');