This commit is contained in:
Stephane Martin 2013-08-26 15:16:41 +02:00
parent 29c28a45ca
commit 81a45cfcf1
1 changed files with 10 additions and 5 deletions

View File

@ -795,12 +795,17 @@ class OC {
) {
return false;
}
// don't redo authentication if user is already logged in
// otherwise session would be invalidated in OC_User::login with
// session_regenerate_id at every page load
if (!OC_User::isLoggedIn()) {
OC_App::loadApps(array('authentication'));
if (OC_User::login($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"])) {
//OC_Log::write('core',"Logged in with HTTP Authentication", OC_Log::DEBUG);
OC_User::unsetMagicInCookie();
$_SERVER['HTTP_REQUESTTOKEN'] = OC_Util::callRegister();
}
}
return true;
}