X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FAuth%2FDB.pm;h=2ad131a8dc1b58d25a9ae31a5c346c985cab2412;hb=4065042cd5d4e57afab40cfcf2074a6b4c7fd9c7;hp=d4e4d48ccad1a83a099a9fef7314b8664d13c85d;hpb=c510d88bbfea6818ffafaddb7286e88aec96d3b8;p=kivitendo-erp.git diff --git a/SL/Auth/DB.pm b/SL/Auth/DB.pm index d4e4d48cc..2ad131a8d 100644 --- a/SL/Auth/DB.pm +++ b/SL/Auth/DB.pm @@ -1,8 +1,6 @@ package SL::Auth::DB; -use DBI; - -#use SL::Auth; +use SL::Auth::Constants qw(:all); use SL::DBUtils; use strict; @@ -34,7 +32,7 @@ sub authenticate { if (!$dbh) { $main::lxdebug->leave_sub(); - return SL::Auth->ERR_BACKEND(); + return ERR_BACKEND; } my $query = qq|SELECT password FROM auth."user" WHERE login = ?|; @@ -45,7 +43,7 @@ sub authenticate { $main::lxdebug->leave_sub(); - return $password eq $stored_password ? SL::Auth->OK() : SL::Auth->ERR_PASSWORD(); + return $password eq $stored_password ? OK : ERR_PASSWORD; } sub can_change_password { @@ -64,7 +62,7 @@ sub change_password { if (!$dbh) { $main::lxdebug->leave_sub(); - return SL::Auth->ERR_BACKEND() + return ERR_BACKEND; } $password = crypt $password, substr($login, 0, 2) if (!$is_crypted);