]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add basic auth for user_timeline
authorEvan Prodromou <evan@prodromou.name>
Sat, 19 Jul 2008 15:47:53 +0000 (11:47 -0400)
committerEvan Prodromou <evan@prodromou.name>
Sat, 19 Jul 2008 15:47:53 +0000 (11:47 -0400)
darcs-hash:20080719154753-84dde-9b0da984d03ed4010abddbc77858d86986c075b0.gz

actions/twitapistatuses.php

index 96931fec634949caef800d55219a1d46ce25d31e..5a4345ab656bb829ebdc3d9aa9caa8b3c80fd647 100644 (file)
@@ -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();