From 9cd6645037dc802fc0e1bc87ac8fdce76243f09d Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Wed, 5 Jun 2013 00:38:08 +0200 Subject: [PATCH] Move comment and set requesttoken. --- lib/base.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/base.php b/lib/base.php index 42d8fb3c8d9..ab69b707d35 100644 --- a/lib/base.php +++ b/lib/base.php @@ -571,6 +571,7 @@ class OC { self::checkUpgrade(); } + // Test it the user is already authenticated using Apaches AuthType Basic... very usable in combination with LDAP OC::tryBasicAuthLogin(); if (!self::$CLI) { @@ -674,12 +675,9 @@ class OC { // remember was checked after last login if (OC::tryRememberLogin()) { $error[] = 'invalidcookie'; - // Someone wants to log in : } elseif (OC::tryFormLogin()) { $error[] = 'invalidpassword'; - - // The user is already authenticated using Apaches AuthType Basic... very usable in combination with LDAP } OC_Util::displayLoginPage(array_unique($error)); @@ -779,6 +777,7 @@ class OC { 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.39.5