summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-10-14 20:33:11 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-10-14 20:34:36 +0200
commit9a5af50f32d59858a324eb013781155341cb4972 (patch)
treec5f4a55691752736032ec00c2d0f256fe6ae59c9
parentc0b011e71427ac25b13ac44d34eb3a747d17832b (diff)
parent2cc5f5e19eb1039165564940a5a8e150dc2a5cf1 (diff)
downloadnextcloud-server-9a5af50f32d59858a324eb013781155341cb4972.tar.gz
nextcloud-server-9a5af50f32d59858a324eb013781155341cb4972.zip
Merge commit 'refs/merge-requests/59' of git://gitorious.org/owncloud/owncloud
-rw-r--r--index.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/index.php b/index.php
index 4e1f5bcc8d6..924e7394f7b 100644
--- a/index.php
+++ b/index.php
@@ -100,6 +100,14 @@ else {
$error = true;
}
}
-
+ // The user is already authenticated using Apaches AuthType Basic... very usable in combination with LDAP
+ elseif(isset($_SERVER["PHP_AUTH_USER"]) && isset($_SERVER["PHP_AUTH_PW"])){
+ if (OC_User::login($_SERVER["PHP_AUTH_USER"],$_SERVER["PHP_AUTH_PW"])) {
+ OC_User::unsetMagicInCookie();
+ OC_Util::redirectToDefaultPage();
+ }else{
+ $error = true;
+ }
+ }
OC_Template::printGuestPage('', 'login', array('error' => $error, 'redirect' => isset($_REQUEST['redirect_url'])?$_REQUEST['redirect_url']:'' ));
}