]> source.dussan.org Git - nextcloud-server.git/commitdiff
Move comment and set requesttoken.
authorThomas Tanghus <thomas@tanghus.net>
Tue, 4 Jun 2013 22:38:08 +0000 (00:38 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Tue, 4 Jun 2013 22:38:08 +0000 (00:38 +0200)
lib/base.php

index 42d8fb3c8d921e70d872599a90b761726ff92f9f..ab69b707d35ac892264ab51d27873e5d6a6a2383 100644 (file)
@@ -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;
        }