summaryrefslogtreecommitdiff
path: root/actions/twitapiusers.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-07-11 07:30:26 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-07-11 07:30:26 -0700
commit55415652382d1f3ae77123d197e01d95da83041e (patch)
tree449ee7e9aebe184583f099e49a7194eb5bbf8543 /actions/twitapiusers.php
parentbfae5489cb629331f2936b2bf1066adb3976bce1 (diff)
parent7621e0e38467349a89f71e814941932fbacecfa1 (diff)
Merge branch 'testing'
Diffstat (limited to 'actions/twitapiusers.php')
-rw-r--r--actions/twitapiusers.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/actions/twitapiusers.php b/actions/twitapiusers.php
index 4057b63e7..fea41b397 100644
--- a/actions/twitapiusers.php
+++ b/actions/twitapiusers.php
@@ -37,24 +37,24 @@ class TwitapiusersAction extends TwitterapiAction
$user = null;
$email = $this->arg('email');
- $user_id = $this->arg('user_id');
// XXX: email field deprecated in Twitter's API
- // XXX: Also: need to add screen_name param
-
if ($email) {
$user = User::staticGet('email', $email);
- } elseif ($user_id) {
- $user = $this->get_user($user_id);
- } elseif (isset($apidata['api_arg'])) {
- $user = $this->get_user($apidata['api_arg']);
- } elseif (isset($apidata['user'])) {
- $user = $apidata['user'];
+ } else {
+ $user = $this->get_user($apidata['api_arg'], $apidata);
}
if (empty($user)) {
- $this->client_error(_('Not found.'), 404, $apidata['content-type']);
+ $this->clientError(_('Not found.'), 404, $apidata['content-type']);
+ return;
+ }
+
+ $profile = $user->getProfile();
+
+ if (!$profile) {
+ common_server_error(_('User has no profile.'));
return;
}