summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/base.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/base.php b/lib/base.php
index d1279a46337..14754a00161 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -598,6 +598,9 @@ 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) {
try {
if (!OC_Config::getValue('maintenance', false)) {
@@ -699,15 +702,11 @@ 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
- } elseif (OC::tryBasicAuthLogin()) {
- $error[] = 'invalidpassword';
}
+
OC_Util::displayLoginPage(array_unique($error));
}
@@ -805,8 +804,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();
- $_REQUEST['redirect_url'] = OC_Request::requestUri();
- OC_Util::redirectToDefaultPage();
+ $_SERVER['HTTP_REQUESTTOKEN'] = OC_Util::callRegister();
}
return true;
}