projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fafc4b3
)
Convenience: Config-Value aus auth.user_configs über AuthUser-Objekt auslesen
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Thu, 13 Jan 2011 12:28:19 +0000
(13:28 +0100)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Thu, 13 Jan 2011 12:28:19 +0000
(13:28 +0100)
SL/DB/AuthUser.pm
patch
|
blob
|
history
diff --git
a/SL/DB/AuthUser.pm
b/SL/DB/AuthUser.pm
index
0d22be9
..
2a15449
100644
(file)
--- a/
SL/DB/AuthUser.pm
+++ b/
SL/DB/AuthUser.pm
@@
-5,6
+5,8
@@
package SL::DB::AuthUser;
use strict;
+use List::Util qw(first);
+
use SL::DB::MetaSetup::AuthUser;
use SL::DB::AuthUserGroup;
@@
-29,4
+31,11
@@
__PACKAGE__->meta->add_relationship(
__PACKAGE__->meta->initialize;
+sub get_config_value {
+ my ($self, $key) = @_;
+
+ my $cfg = first { $_->cfg_key eq $key } @{ $self->configs };
+ return $cfg ? $cfg->cfg_value : undef;
+}
+
1;