X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Ftwitapiusers.php;h=4057b63e740527d82f5624b78eea2e3d56491d0e;hb=aec6456c9181ea97e11eb74c5eaf868c2406bebb;hp=b90bbfa985c9a6a381a5397647b54518225e6768;hpb=78f8b91a13ee07ed3344fd6411a0829a16bef4b1;p=quix0rs-gnu-social.git diff --git a/actions/twitapiusers.php b/actions/twitapiusers.php index b90bbfa985..4057b63e74 100644 --- a/actions/twitapiusers.php +++ b/actions/twitapiusers.php @@ -1,7 +1,7 @@ . */ -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');