Fix Choice (fixes: #1217)

This commit is contained in:
Xavier Guimard 2017-04-25 08:11:16 +00:00
parent c5dbed80b7
commit d9dcc98f11
2 changed files with 10 additions and 7 deletions

View File

@ -14,7 +14,15 @@ sub init {
sub extractFormInfo {
my ( $self, $req ) = @_;
$self->checkChoice($req) or return PE_FIRSTACCESS;
unless ( $self->checkChoice($req) ) {
foreach my $mod ( values %{ $self->modules } ) {
if ( $mod->can('setSecurity') ) {
$mod->setSecurity($req);
last;
}
}
return PE_FIRSTACCESS;
}
return $req->datas->{enabledMods0}->[0]->extractFormInfo($req);
}
@ -31,9 +39,4 @@ sub authLogout {
return $_[1]->datas->{enabledMods0}->[0]->authLogout( $_[1] );
}
sub getDisplayType {
$_[0]->checkChoice( $_[1] ) or return PE_OK;
return $_[1]->datas->{enabledMods0}->[0]->getDisplayType( $_[1] );
}
1;

View File

@ -296,7 +296,7 @@ sub display {
else {
# Authentication loop
if ( $req->sessionInfo->{_choice}
if ( $self->conf->{authentication} eq 'Choice'
and my $authLoop = $self->_buildAuthLoop($req) )
{
%templateParams = (