Fix "refresh" feature for Choice

Fixes: #1339
This commit is contained in:
Xavier Guimard 2017-12-18 10:40:07 +01:00
parent 55aaed7a8d
commit 6106f37fac
2 changed files with 5 additions and 2 deletions

View File

@ -31,7 +31,9 @@ sub authenticate {
}
sub setAuthSessionInfo {
return $_[1]->datas->{enabledMods0}->[0]->setAuthSessionInfo( $_[1] );
my ( $self, $req ) = @_;
$self->checkChoice($req) unless ( $req->datas->{enabledMods0} );
return $req->datas->{enabledMods0}->[0]->setAuthSessionInfo($req);
}
sub authLogout {

View File

@ -57,7 +57,8 @@ sub init {
sub checkChoice {
my ( $self, $req ) = @_;
my $name =
$req->sessionInfo->{_choice}
$req->userData->{_choice}
|| $req->sessionInfo->{_choice}
|| $req->param( $self->conf->{authChoiceParam} )
or return 0;
return $name if ( $req->datas->{ "enabledMods" . $self->type } );