- if (!$self->{authenticator}) {
- my $locale = Locale->new('en');
- $self->mini_error($locale->text('No or an unknown authenticantion module specified in "config/kivitendo.conf".'));
+ if (!$config) {
+ my $locale = Locale->new('en');
+ $self->mini_error($locale->text('Missing configuration section "authentication/#1" in "config/kivitendo.conf".', $config_name));
+ }
+
+ if ($module eq 'DB') {
+ push @{ $self->{authenticators} }, SL::Auth::DB->new($self);
+
+ } elsif ($module eq 'LDAP') {
+ push @{ $self->{authenticators} }, SL::Auth::LDAP->new($config);
+
+ } else {
+ my $locale = Locale->new('en');
+ $self->mini_error($locale->text('Unknown authenticantion module #1 specified in "config/kivitendo.conf".', $module));
+ }