Skip to content
Snippets Groups Projects
Commit bbbd6339 authored by Olav Morken's avatar Olav Morken
Browse files

Change SSOService consent parts to use getValueValidate.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@716 44740490-163a-0410-bde0-09ae8108e29a
parent 29aa425f
No related branches found
No related tags found
No related merge requests found
......@@ -297,7 +297,7 @@ if($needAuth && !$isPassive) {
}
$t->data['sppp'] = $privacypolicy;
switch($config->getString('consent_autofocus', NULL)) {
switch($config->getValueValidate('consent_autofocus', array(NULL, 'yes', 'no'), NULL)) {
case NULL:
break;
case 'yes':
......@@ -306,9 +306,6 @@ if($needAuth && !$isPassive) {
case 'no':
$t->data['autofocus'] = 'nobutton';
break;
default:
throw new Exception('Invalid value for the consent_autofocus option.' .
' Should be one of NULL, \'yes\' or \'no\'.');
}
$t->show();
......
......@@ -209,7 +209,7 @@ if (!$session->isAuthenticated($authority) ) {
}
$t->data['sppp'] = $privacypolicy;
switch($config->getString('consent_autofocus', NULL)) {
switch($config->getValueValidate('consent_autofocus', array(NULL, 'yes', 'no'), NULL)) {
case NULL:
break;
case 'yes':
......@@ -218,9 +218,6 @@ if (!$session->isAuthenticated($authority) ) {
case 'no':
$t->data['autofocus'] = 'nobutton';
break;
default:
throw new Exception('Invalid value for the consent_autofocus option.' .
' Should be one of NULL, \'yes\' or \'no\'.');
}
$t->show();
......
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