X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/32b79fa8495846e993a7130fc9271ca39e2e6c44..288111da982510d86d73db5cef54c52e07a84f5a:/SL/DB/AuthUser.pm diff --git a/SL/DB/AuthUser.pm b/SL/DB/AuthUser.pm index bd2670bc6..0b1942118 100644 --- a/SL/DB/AuthUser.pm +++ b/SL/DB/AuthUser.pm @@ -36,9 +36,8 @@ sub validate { my ($self) = @_; my @errors; - push @errors, $::locale->text('The login is missing.') if !$self->login; - push @errors, $::locale->text('The login is not unique.') if !SL::DB::Helper::Util::is_unique($self, 'login'); - push @errors, "chunky bacon"; + push @errors, $::locale->text('The login is missing.') if !$self->login; + push @errors, $::locale->text('The login is not unique.') if !SL::DB::Helper::Util::is_unique($self, 'login'); return @errors; } @@ -46,7 +45,7 @@ sub validate { sub get_config_value { my ($self, $key) = @_; - my $cfg = first { $_->cfg_key eq $key } @{ $self->configs }; + my $cfg = first { $_->cfg_key eq $key } @{ $self->configs || [] }; return $cfg ? $cfg->cfg_value : undef; } @@ -58,7 +57,7 @@ sub config_values { $self->configs([ map { SL::DB::AuthUserConfig->new(cfg_key => $_, cfg_value => $settings{$_}) } keys %settings ]); } - return { map { ($_->cfg_key => $_->cfg_value) } @{ $self->configs } }; + return { map { ($_->cfg_key => $_->cfg_value) } @{ $self->configs || [] } }; } 1;