From: Thomas Tanghus Date: Tue, 4 Jun 2013 22:38:08 +0000 (+0200) Subject: Move comment and set requesttoken. X-Git-Tag: v6.0.0alpha2~459^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9cd6645037dc802fc0e1bc87ac8fdce76243f09d;p=nextcloud-server.git Move comment and set requesttoken. --- 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; }