Convenience-Funktion, um einfacher an Config-Werte
heranzukommen. Beispiel:
foreach my $employee (@{ SL::DB::Manager::Employee->get_all }) {
my $email = $employee->auth_user->get_config_value('email');
do_stuff_with($email);
}
return $self->name || $self->login;
}
+sub auth_user {
+ my ($self) = @_;
+
+ die 'not an accessor' if scalar(@_) > 1;
+
+ require SL::DB::AuthUser;
+
+ return SL::DB::Manager::AuthUser->find_by(login => $self->login);
+}
+
1;