Use get_module for check in UserDBOpenID init

This commit is contained in:
Clément Oudot 2010-10-01 13:04:13 +00:00
parent 82feff1eb7
commit a81c8c7f52

View File

@ -15,10 +15,8 @@ our $VERSION = '0.01';
# @return Lemonldap::NG::Portal error code # @return Lemonldap::NG::Portal error code
sub userDBInit { sub userDBInit {
my $self = shift; my $self = shift;
if ( $self->{authentication} =~ /^OpenID/
or $self->{stack}->[0]->[0]->{m} =~ /^OpenID/ ) if ( $self->get_module('auth') eq 'OpenID' ) {
{
return PE_OK;
} }
else { else {
$self->lmLog( $self->lmLog(
@ -68,7 +66,6 @@ sub setSessionInfo {
'warn' 'warn'
); );
# TODO: create a PE_* for that
return PE_MISSINGREQATTR; return PE_MISSINGREQATTR;
} }
} }