From: djfiander Date: Sun, 16 Apr 2006 15:47:29 +0000 (+0000) Subject: Minor cleanups. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=894c5935ea0e32cf374edfffb247757981b157d6;p=SIPServer.git Minor cleanups. --- diff --git a/ILS/Patron.pm b/ILS/Patron.pm index 7b61cb6..c4d5de1 100644 --- a/ILS/Patron.pm +++ b/ILS/Patron.pm @@ -59,8 +59,8 @@ sub new { if (!exists($patron_db{$patron_id})) { return undef; } - $self = $patron_db{$patron_id}; + bless $self, $type; return $self; } @@ -167,10 +167,18 @@ sub items_billed { return $self->{items_billed}; } +sub password { + my $self = shift; + + return $self->{password}; +} + sub check_password { my ($self, $pwd) = @_; - return ($self->{password} eq $pwd); + # If the patron doesn't have a password, + # then we don't need to check + return (!$self->{password} || ($pwd && ($self->{password} eq $pwd))); } sub currency {