Skip to content
Snippets Groups Projects
Commit 2cc5f5e1 authored by Patrick Stricker's avatar Patrick Stricker
Browse files

made work with http authentication kind of sso login

parent 9d3c7bad
No related branches found
No related tags found
No related merge requests found
......@@ -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']:'' ));
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment