From: cweiske Date: Sat, 16 Jan 2010 08:16:10 +0000 (+0000) Subject: Fix bug #2928905: API was broken when no user was logged in X-Git-Tag: v0.97~120 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=f1fcaaae0e61ee1b31dd986db25d9ae4db11639a;p=semanticscuttle.git 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 --- 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(); } }