Auth modules must be set

This commit is contained in:
Xavier Guimard 2015-03-09 15:55:46 +00:00
parent fc6c64d6f3
commit 53e41d145c

View File

@ -308,7 +308,8 @@ sub new {
foreach my $type (qw(authentication userDB passwordDB registerDB)) { foreach my $type (qw(authentication userDB passwordDB registerDB)) {
my $module_name = 'Lemonldap::NG::Portal::'; my $module_name = 'Lemonldap::NG::Portal::';
my $db_type = $type; my $db_type = $type;
my $db_name = $self->{$db_type}; my $db_name = $self->{$db_type}
or $self->abort("'$db_type' is not set");
# Adapt module type to real module name # Adapt module type to real module name
$db_type =~ s/authentication/Auth/; $db_type =~ s/authentication/Auth/;
@ -1653,8 +1654,9 @@ sub controlExistingSession {
'debug' 'debug'
); );
if ( $self->{sessionInfo}->{'_auth'} ne if (
$self->get_module('auth') ) $self->{sessionInfo}->{'_auth'} ne $self->get_module('auth')
)
{ {
my $module_name = 'Lemonldap::NG::Portal::Auth' my $module_name = 'Lemonldap::NG::Portal::Auth'
. $self->{sessionInfo}->{_auth}; . $self->{sessionInfo}->{_auth};