Commit 2153546c authored by Christophe Maudoux's avatar Christophe Maudoux

Display error msg

parent 9a847e62
...@@ -5,9 +5,13 @@ use strict; ...@@ -5,9 +5,13 @@ use strict;
sub new { sub new {
my ( $class, $self ) = @_; my ( $class, $self ) = @_;
unless ( $self->{conf}->{customAuth} ) { unless ( $self->{conf}->{customAuth} ) {
die 'Custom auth module not defined'; die 'Custom Auth module not defined';
} }
return $self->{p}->loadModule( $self->{conf}->{customAuth} );
eval $self->{p}->loadModule( $self->{conf}->{customAuth} );
($@)
? return $self->{p}->loadModule( $self->{conf}->{customAuth} )
: die 'Unable to load Auth module ' . $self->{conf}->{customAuth};
} }
1; 1;
...@@ -5,9 +5,13 @@ use strict; ...@@ -5,9 +5,13 @@ use strict;
sub new { sub new {
my ( $class, $self ) = @_; my ( $class, $self ) = @_;
unless ( $self->{conf}->{customPassword} ) { unless ( $self->{conf}->{customPassword} ) {
die 'Custom password module not defined'; die 'Custom Password module not defined';
} }
return $self->{p}->loadModule( $self->{conf}->{customPassword} );
eval $self->{p}->loadModule( $self->{conf}->{customPassword} );
($@)
? return $self->{p}->loadModule( $self->{conf}->{customPassword} )
: die 'Unable to load Password module ' . $self->{conf}->{customPassword};
} }
1; 1;
...@@ -5,9 +5,13 @@ use strict; ...@@ -5,9 +5,13 @@ use strict;
sub new { sub new {
my ( $class, $self ) = @_; my ( $class, $self ) = @_;
unless ( $self->{conf}->{customUserDB} ) { unless ( $self->{conf}->{customUserDB} ) {
die 'Custom user DB module not defined'; die 'Custom User DB module not defined';
} }
return $self->{p}->loadModule( $self->{conf}->{customUserDB} );
eval $self->{p}->loadModule( $self->{conf}->{customUserDB} );
($@)
? return $self->{p}->loadModule( $self->{conf}->{customUserDB} )
: die 'Unable to load UserDB module ' . $self->{conf}->{customUserDB};
} }
1; 1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment