Merge commit 'refs/merge-requests/59' of git://gitorious.org/owncloud/owncloud

This commit is contained in:
Robin Appelman 2011-10-14 20:33:11 +02:00
commit 9a5af50f32
1 changed files with 9 additions and 1 deletions

View File

@ -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']:'' ));
}