Setup account later

Stable11 of https://github.com/nextcloud/user_saml/pull/78

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
Lukas Reschke 2017-01-19 01:51:37 +01:00
parent 2714a876a6
commit 37b9ddf67b
No known key found for this signature in database
GPG key ID: B9F6980CF6E759B1
2 changed files with 2 additions and 2 deletions

View file

@ -60,7 +60,6 @@ switch($config->getAppValue('user_saml', 'type')) {
$type = 'saml';
break;
case 'environment-variable':
\OC::$server->getSession()->set('user_saml.samlUserData', $_SERVER);
$type = 'environment-variable';
break;
}
@ -74,7 +73,7 @@ $redirectSituation = false;
// redirected to the SAML login endpoint
if(!$userSession->isLoggedIn() &&
\OC::$server->getRequest()->getPathInfo() === '/login' &&
$type === 'saml') {
$type !== '') {
$redirectSituation = true;
}

View file

@ -127,6 +127,7 @@ class SAMLController extends Controller {
break;
case 'environment-variable':
$ssoUrl = $this->urlGenerator->getAbsoluteURL('/');
$this->session->set('user_saml.samlUserData', $_SERVER);
try {
$this->autoprovisionIfPossible($this->session->get('user_saml.samlUserData'));
} catch (NoUserFoundException $e) {