From 59b1a87bf1681405977bb1cf273b893fdff0cd30 Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Fri, 31 Oct 2014 23:49:53 +0100 Subject: [PATCH] [fix] Apply #4574 fix manually --- sources/lib/base.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sources/lib/base.php b/sources/lib/base.php index ab3e34a..fc257e9 100644 --- a/sources/lib/base.php +++ b/sources/lib/base.php @@ -969,10 +969,12 @@ class OC { return false; } - 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(); + if (!OC_User::isLoggedIn()) { + 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; } -- 2.0.0