From: Moritz Bunkus Date: Mon, 25 Oct 2010 13:13:38 +0000 (+0200) Subject: Convenience-Funktion zum Auslesen von Employee-Objekten zu einer AuthGroup X-Git-Tag: release-2.6.3~61^2~7^2~1^2~2^2~31 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=5916be6b96be6564f9e35188930a2d67654efbbc;p=kivitendo-erp.git Convenience-Funktion zum Auslesen von Employee-Objekten zu einer AuthGroup --- diff --git a/SL/DB/AuthGroup.pm b/SL/DB/AuthGroup.pm index 8bd54506c..fe755c7b5 100644 --- a/SL/DB/AuthGroup.pm +++ b/SL/DB/AuthGroup.pm @@ -29,4 +29,9 @@ __PACKAGE__->meta->add_relationship( __PACKAGE__->meta->initialize; +sub get_employees { + my @logins = map { $_->login } $_[0]->users; + return @logins ? @{ SL::DB::Manager::Employee->get_all(query => [ login => \@logins ]) } : (); +} + 1;