View | Details | Raw Unified | Return to bug 14507
Collapse All | Expand All

(-)a/C4/SIP/ILS/Patron.pm (-7 / +6 lines)
Lines 192-208 sub AUTOLOAD { Link Here
192
}
192
}
193
193
194
sub check_password {
194
sub check_password {
195
    my ($self, $pwd) = @_;
195
    my ( $self, $pwd ) = @_;
196
196
197
    defined $pwd or return 0;                  # you gotta give me something (at least ''), or no deal
197
    defined $pwd
198
      or return 0;    # you gotta give me something (at least ''), or no deal
198
199
199
    if ($pwd eq q{}) {
200
    return 1
200
        return 1;
201
      if $pwd eq q{};    # if the record has a NULL password, accept '' as match
201
    }
202
202
203
    my $dbh = C4::Context->dbh;
203
    my $dbh = C4::Context->dbh;
204
    my $ret = 0;
204
    my $ret = 0;
205
    ($ret) = checkpw($dbh, $self->{userid}, $pwd);
205
    ($ret) = checkpw( $dbh, $self->{userid}, $pwd );
206
    return $ret;
206
    return $ret;
207
}
207
}
208
208
209
- 

Return to bug 14507