Lines 22-28
use C4::Members;
Link Here
|
22 |
use C4::Reserves; |
22 |
use C4::Reserves; |
23 |
use C4::Branch qw(GetBranchName); |
23 |
use C4::Branch qw(GetBranchName); |
24 |
use C4::Items qw( GetBarcodeFromItemnumber GetItemnumbersForBiblio); |
24 |
use C4::Items qw( GetBarcodeFromItemnumber GetItemnumbersForBiblio); |
25 |
use C4::Auth qw(checkpw_hash); |
25 |
use C4::Auth qw(checkpw); |
26 |
|
26 |
|
27 |
our $VERSION = 3.07.00.049; |
27 |
our $VERSION = 3.07.00.049; |
28 |
|
28 |
|
Lines 102-107
sub new {
Link Here
|
102 |
inet => ( !$debarred && !$expired ), |
102 |
inet => ( !$debarred && !$expired ), |
103 |
expired => $expired, |
103 |
expired => $expired, |
104 |
fee_limit => $fee_limit, |
104 |
fee_limit => $fee_limit, |
|
|
105 |
userid => $kp->{userid}, |
105 |
); |
106 |
); |
106 |
} |
107 |
} |
107 |
$debug and warn "patron fines: $ilspatron{fines} ... amountoutstanding: $kp->{amountoutstanding} ... CHARGES->amount: $flags->{CHARGES}->{amount}"; |
108 |
$debug and warn "patron fines: $ilspatron{fines} ... amountoutstanding: $kp->{amountoutstanding} ... CHARGES->amount: $flags->{CHARGES}->{amount}"; |
Lines 192-204
sub AUTOLOAD {
Link Here
|
192 |
|
193 |
|
193 |
sub check_password { |
194 |
sub check_password { |
194 |
my ($self, $pwd) = @_; |
195 |
my ($self, $pwd) = @_; |
|
|
196 |
|
195 |
defined $pwd or return 0; # you gotta give me something (at least ''), or no deal |
197 |
defined $pwd or return 0; # you gotta give me something (at least ''), or no deal |
196 |
|
198 |
|
197 |
my $hashed_pwd = $self->{password}; |
199 |
if ($pwd eq q{}) { |
198 |
defined $hashed_pwd or return $pwd eq ''; # if the record has a NULL password, accept '' as match |
200 |
return 1; |
|
|
201 |
} |
199 |
|
202 |
|
200 |
# warn sprintf "check_password for %s: '%s' vs. '%s'",($self->{name}||''),($self->{password}||''),($pwd||''); |
203 |
my $dbh = C4::Context->dbh; |
201 |
return checkpw_hash($pwd, $hashed_pwd); |
204 |
my $ret = 0; |
|
|
205 |
($ret) = checkpw($dbh, $self->{userid}, $pwd); |
206 |
return $ret; |
202 |
} |
207 |
} |
203 |
|
208 |
|
204 |
# A few special cases, not in AUTOLOADed %fields |
209 |
# A few special cases, not in AUTOLOADed %fields |
205 |
- |
|
|