From f1fcaaae0e61ee1b31dd986db25d9ae4db11639a Mon Sep 17 00:00:00 2001 From: cweiske Date: Sat, 16 Jan 2010 08:16:10 +0000 Subject: Fix bug #2928905: API was broken when no user was logged in git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@580 b3834d28-1941-0410-a4f8-b48e95affb8f --- www/api/httpauth.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'www/api') diff --git a/www/api/httpauth.inc.php b/www/api/httpauth.inc.php index 1d20d31..8ae6bed 100644 --- a/www/api/httpauth.inc.php +++ b/www/api/httpauth.inc.php @@ -27,7 +27,9 @@ if (!$userservice->isLoggedOn()) { authenticate(); } else { $login = $userservice->login($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']); - if (!$login) { + if ($login) { + $currentUser = $userservice->getCurrentObjectUser(); + } else { authenticate(); } } -- cgit v1.2.3