summaryrefslogtreecommitdiff
path: root/actions/twitapistatuses.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-07-19 11:47:53 -0400
committerEvan Prodromou <evan@prodromou.name>2008-07-19 11:47:53 -0400
commita218bec9828f8e358f774d8e426c12a32346b92a (patch)
tree5e775d6cce1f125824efcdceafbaa2c7e1764a73 /actions/twitapistatuses.php
parent54a931a31ac12a8982e8b81af5fd6dde4fa6463a (diff)
add basic auth for user_timeline
darcs-hash:20080719154753-84dde-9b0da984d03ed4010abddbc77858d86986c075b0.gz
Diffstat (limited to 'actions/twitapistatuses.php')
-rw-r--r--actions/twitapistatuses.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/actions/twitapistatuses.php b/actions/twitapistatuses.php
index 96931fec6..5a4345ab6 100644
--- a/actions/twitapistatuses.php
+++ b/actions/twitapistatuses.php
@@ -309,6 +309,14 @@ class TwitapistatusesAction extends TwitterapiAction {
// Set the user to be the auth user if asked-for can't be found
// honestly! This is what Twitter does, I swear --Zach
$user = $apidata['user'];
+
+ if (!$user) {
+ # This header makes basic auth go
+ header('WWW-Authenticate: Basic realm="Laconica API"');
+ # if the user hits cancel -- bam!
+ common_show_basic_auth_error();
+ exit();
+ }
}
$profile = $user->getProfile();