Skip to content

Commit

Permalink
fixed test mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred Neumann committed Dec 8, 2021
1 parent d75beb2 commit 1af740a
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions classes/class.ilVhbShibAuthPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,21 @@ public function getMatching()

// apply test data as early as possible
if (!empty($_GET['test']) && $_GET['test'] == $this->getConfig()->get('test_activation')) {
$_SERVER['givenName'] = $this->getConfig()->get('test_given_name');
$_SERVER['sn'] = $this->getConfig()->get('test_sn');
$_SERVER['mail'] = $this->getConfig()->get('test_mail');
$_SERVER['eduPersonPrincipalName'] = $this->getConfig()->get('test_principal_name');
$_SERVER['eduPersonEntitlement'] = $this->getConfig()->get('test_entitlement');
if (!empty($this->getConfig()->get('test_given_name'))) {
$_SERVER['givenName'] = $this->getConfig()->get('test_given_name');
}
if (!empty($this->getConfig()->get('test_sn'))) {
$_SERVER['sn'] = $this->getConfig()->get('test_sn');
}
if (!empty($this->getConfig()->get('test_mail'))) {
$_SERVER['mail'] = $this->getConfig()->get('test_mail');
}
if (!empty($this->getConfig()->get('test_principal_name'))) {
$_SERVER['eduPersonPrincipalName'] = $this->getConfig()->get('test_principal_name');
}
if (!empty($this->getConfig()->get('test_entitlement'))) {
$_SERVER['eduPersonEntitlement'] = $this->getConfig()->get('test_entitlement');
}
}

$this->includeClass('class.ilVhbShibAuthMatching.php');
Expand Down

0 comments on commit 1af740a

Please sign in to comment.