Bringing users/show in line with Twitter as far as specifying user.

This commit is contained in:
Dan Moore 2009-06-05 12:53:17 -04:00
parent 9e16b7d89b
commit 40e05a3e86

View File

@ -35,20 +35,13 @@ class TwitapiusersAction extends TwitterapiAction
$user = null; $user = null;
$email = $this->arg('email'); $email = $this->arg('email');
$user_id = $this->arg('user_id');
// XXX: email field deprecated in Twitter's API // XXX: email field deprecated in Twitter's API
// XXX: Also: need to add screen_name param
if ($email) { if ($email) {
$user = User::staticGet('email', $email); $user = User::staticGet('email', $email);
} elseif ($user_id) { } else {
$user = $this->get_user($user_id);
} elseif (isset($apidata['api_arg'])) {
$user = $this->get_user($apidata['api_arg']); $user = $this->get_user($apidata['api_arg']);
} elseif (isset($apidata['user'])) {
$user = $apidata['user'];
} }
if (!$user) { if (!$user) {