Revision c510d88b
Von Sven Schöling vor etwa 15 Jahren hinzugefügt
SL/Auth/DB.pm | ||
---|---|---|
5 | 5 |
#use SL::Auth; |
6 | 6 |
use SL::DBUtils; |
7 | 7 |
|
8 |
use strict; |
|
9 |
|
|
8 | 10 |
sub new { |
9 | 11 |
$main::lxdebug->enter_sub(); |
10 | 12 |
|
... | ... | |
32 | 34 |
|
33 | 35 |
if (!$dbh) { |
34 | 36 |
$main::lxdebug->leave_sub(); |
35 |
return SL::Auth::ERR_BACKEND;
|
|
37 |
return SL::Auth->ERR_BACKEND();
|
|
36 | 38 |
} |
37 | 39 |
|
38 | 40 |
my $query = qq|SELECT password FROM auth."user" WHERE login = ?|; |
... | ... | |
43 | 45 |
|
44 | 46 |
$main::lxdebug->leave_sub(); |
45 | 47 |
|
46 |
return $password eq $stored_password ? SL::Auth::OK : SL::Auth::ERR_PASSWORD;
|
|
48 |
return $password eq $stored_password ? SL::Auth->OK() : SL::Auth->ERR_PASSWORD();
|
|
47 | 49 |
} |
48 | 50 |
|
49 | 51 |
sub can_change_password { |
... | ... | |
62 | 64 |
|
63 | 65 |
if (!$dbh) { |
64 | 66 |
$main::lxdebug->leave_sub(); |
65 |
return SL::Auth::ERR_BACKEND
|
|
67 |
return SL::Auth->ERR_BACKEND()
|
|
66 | 68 |
} |
67 | 69 |
|
68 | 70 |
$password = crypt $password, substr($login, 0, 2) if (!$is_crypted); |
Auch abrufbar als: Unified diff
und die restlichen .pm Module.