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