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
This commit is contained in:
cweiske 2010-01-16 08:16:10 +00:00
parent 09538ab147
commit f1fcaaae0e

View file

@ -27,7 +27,9 @@ if (!$userservice->isLoggedOn()) {
authenticate(); authenticate();
} else { } else {
$login = $userservice->login($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']); $login = $userservice->login($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']);
if (!$login) { if ($login) {
$currentUser = $userservice->getCurrentObjectUser();
} else {
authenticate(); authenticate();
} }
} }