Revision 288111da
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/DB/AuthUser.pm | ||
---|---|---|
36 | 36 |
my ($self) = @_; |
37 | 37 |
|
38 | 38 |
my @errors; |
39 |
push @errors, $::locale->text('The login is missing.') if !$self->login; |
|
40 |
push @errors, $::locale->text('The login is not unique.') if !SL::DB::Helper::Util::is_unique($self, 'login'); |
|
41 |
push @errors, "chunky bacon"; |
|
39 |
push @errors, $::locale->text('The login is missing.') if !$self->login; |
|
40 |
push @errors, $::locale->text('The login is not unique.') if !SL::DB::Helper::Util::is_unique($self, 'login'); |
|
42 | 41 |
|
43 | 42 |
return @errors; |
44 | 43 |
} |
... | ... | |
46 | 45 |
sub get_config_value { |
47 | 46 |
my ($self, $key) = @_; |
48 | 47 |
|
49 |
my $cfg = first { $_->cfg_key eq $key } @{ $self->configs }; |
|
48 |
my $cfg = first { $_->cfg_key eq $key } @{ $self->configs || [] };
|
|
50 | 49 |
return $cfg ? $cfg->cfg_value : undef; |
51 | 50 |
} |
52 | 51 |
|
... | ... | |
58 | 57 |
$self->configs([ map { SL::DB::AuthUserConfig->new(cfg_key => $_, cfg_value => $settings{$_}) } keys %settings ]); |
59 | 58 |
} |
60 | 59 |
|
61 |
return { map { ($_->cfg_key => $_->cfg_value) } @{ $self->configs } }; |
|
60 |
return { map { ($_->cfg_key => $_->cfg_value) } @{ $self->configs || [] } };
|
|
62 | 61 |
} |
63 | 62 |
|
64 | 63 |
1; |
Auch abrufbar als: Unified diff
Admin: Anlegen, Bearbeiten und Löschen von Usern im Admin-Controller
Dazu auch "ON DELETE CASCADE" für alle foreign keys in auth.*
Fixt #2279, #2280.