X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/d4925a8b60f04674885e30d9316dc0263f8b9a84..b293ff8ad52fc76ba0c44783e3982418114d6b08:/SL/DB/Employee.pm diff --git a/SL/DB/Employee.pm b/SL/DB/Employee.pm index 8da20c0b9..0c321b62f 100644 --- a/SL/DB/Employee.pm +++ b/SL/DB/Employee.pm @@ -27,4 +27,14 @@ sub safe_name { 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;