only call handleApacheAuth() if we login via environment variables

Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
This commit is contained in:
Björn Schiessle 2018-10-29 23:05:34 +01:00
parent 845977a8ab
commit e653762bb2
No known key found for this signature in database
GPG key ID: 2378A753E2BF04F6

View file

@ -53,7 +53,6 @@ $userBackend = new \OCA\User_SAML\UserBackend(
);
$userBackend->registerBackends(\OC::$server->getUserManager()->getBackends());
OC_User::useBackend($userBackend);
OC_User::handleApacheAuth();
// Setting up the one login config may fail, if so, do not catch the requests later.
$returnScript = false;
@ -74,6 +73,10 @@ switch($config->getAppValue('user_saml', 'type')) {
return;
}
if ($type === 'environment-variable') {
OC_User::handleApacheAuth();
}
if($returnScript === true) {
return;
}