summaryrefslogtreecommitdiff
path: root/www/api
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2010-01-16 08:16:10 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2010-01-16 08:16:10 +0000
commitf1fcaaae0e61ee1b31dd986db25d9ae4db11639a (patch)
treea9c1fca5dc4c3c1b848b833c973cfedd09a3931e /www/api
parent09538ab1475dcf465bdb009f2ae341f311c4902d (diff)
downloadsemanticscuttle-f1fcaaae0e61ee1b31dd986db25d9ae4db11639a.tar.gz
semanticscuttle-f1fcaaae0e61ee1b31dd986db25d9ae4db11639a.tar.bz2
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
Diffstat (limited to 'www/api')
-rw-r--r--www/api/httpauth.inc.php4
1 files changed, 3 insertions, 1 deletions
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();
}
}