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

(-)a/C4/SIP/ILS/Patron.pm (-2 / +6 lines)
Lines 37-49 sub new { Link Here
37
	my ($class, $patron_id) = @_;
37
	my ($class, $patron_id) = @_;
38
    my $type = ref($class) || $class;
38
    my $type = ref($class) || $class;
39
    my $self;
39
    my $self;
40
    #check both cardnumber and userid
40
	$kp = GetMember(cardnumber=>$patron_id);
41
	$kp = GetMember(cardnumber=>$patron_id);
42
	    if (defined $kp) {
43
	    } else {
44
            $kp = GetMember(userid=>$patron_id);
45
        }
41
	$debug and warn "new Patron (GetMember): " . Dumper($kp);
46
	$debug and warn "new Patron (GetMember): " . Dumper($kp);
42
    unless (defined $kp) {
47
    unless (defined $kp) {
43
		syslog("LOG_DEBUG", "new ILS::Patron(%s): no such patron", $patron_id);
48
		syslog("LOG_DEBUG", "new ILS::Patron(%s): no such patron", $patron_id);
44
        return;
49
        return;
45
	}
50
	}
46
	$kp = GetMemberDetails(undef,$patron_id);
51
	$kp = GetMemberDetails($kp->{'borrowernumber'});
47
	$debug and warn "new Patron (GetMemberDetails): " . Dumper($kp);
52
	$debug and warn "new Patron (GetMemberDetails): " . Dumper($kp);
48
	my $pw        = $kp->{password};  ### FIXME - md5hash -- deal with . 
53
	my $pw        = $kp->{password};  ### FIXME - md5hash -- deal with . 
49
	my $flags     = $kp->{flags};     # or warn "Warning: No flags from patron object for '$patron_id'"; 
54
	my $flags     = $kp->{flags};     # or warn "Warning: No flags from patron object for '$patron_id'"; 
50
- 

Return to bug 9109