diff options
author | Patrick Stricker <stricker@hera.dev.iks-hagen.de> | 2011-10-13 12:04:39 +0400 |
---|---|---|
committer | Patrick Stricker <stricker@hera.dev.iks-hagen.de> | 2011-10-13 12:04:39 +0400 |
commit | 2cc5f5e19eb1039165564940a5a8e150dc2a5cf1 (patch) | |
tree | 8fb26cdfcd804e825c84e970b79479c098f988ac /index.php | |
parent | 9d3c7badb5fd1b9319b35be74e3757702b499d9b (diff) |
made work with http authentication kind of sso login
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/index.php b/index.php index 4e1f5bcc8d6..937784694ce 100644 --- a/index.php +++ b/index.php @@ -100,6 +100,18 @@ 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']:'' )); } |