Move comment and set requesttoken.

This commit is contained in:
Thomas Tanghus 2013-06-05 00:38:08 +02:00
parent ad5c4bf771
commit 9cd6645037
1 changed files with 2 additions and 3 deletions

View File

@ -571,6 +571,7 @@ class OC {
self::checkUpgrade(); self::checkUpgrade();
} }
// Test it the user is already authenticated using Apaches AuthType Basic... very usable in combination with LDAP
OC::tryBasicAuthLogin(); OC::tryBasicAuthLogin();
if (!self::$CLI) { if (!self::$CLI) {
@ -674,12 +675,9 @@ class OC {
// remember was checked after last login // remember was checked after last login
if (OC::tryRememberLogin()) { if (OC::tryRememberLogin()) {
$error[] = 'invalidcookie'; $error[] = 'invalidcookie';
// Someone wants to log in : // Someone wants to log in :
} elseif (OC::tryFormLogin()) { } elseif (OC::tryFormLogin()) {
$error[] = 'invalidpassword'; $error[] = 'invalidpassword';
// The user is already authenticated using Apaches AuthType Basic... very usable in combination with LDAP
} }
OC_Util::displayLoginPage(array_unique($error)); OC_Util::displayLoginPage(array_unique($error));
@ -779,6 +777,7 @@ class OC {
if (OC_User::login($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"])) { 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_Log::write('core',"Logged in with HTTP Authentication", OC_Log::DEBUG);
OC_User::unsetMagicInCookie(); OC_User::unsetMagicInCookie();
$_SERVER['HTTP_REQUESTTOKEN'] = OC_Util::callRegister();
} }
return true; return true;
} }