Revision 23b83d0e
Von Moritz Bunkus vor fast 14 Jahren hinzugefügt
SL/DB/AuthUser.pm | ||
---|---|---|
5 | 5 |
|
6 | 6 |
use strict; |
7 | 7 |
|
8 |
use List::Util qw(first); |
|
9 |
|
|
8 | 10 |
use SL::DB::MetaSetup::AuthUser; |
9 | 11 |
use SL::DB::AuthUserGroup; |
10 | 12 |
|
... | ... | |
29 | 31 |
|
30 | 32 |
__PACKAGE__->meta->initialize; |
31 | 33 |
|
34 |
sub get_config_value { |
|
35 |
my ($self, $key) = @_; |
|
36 |
|
|
37 |
my $cfg = first { $_->cfg_key eq $key } @{ $self->configs }; |
|
38 |
return $cfg ? $cfg->cfg_value : undef; |
|
39 |
} |
|
40 |
|
|
32 | 41 |
1; |
Auch abrufbar als: Unified diff
Convenience: Config-Value aus auth.user_configs über AuthUser-Objekt auslesen