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

(-)a/C4/SIP/ILS/Patron.pm (-3 / +2 lines)
Lines 31-43 sub new { Link Here
31
	my ($class, $patron_id) = @_;
31
	my ($class, $patron_id) = @_;
32
    my $type = ref($class) || $class;
32
    my $type = ref($class) || $class;
33
    my $self;
33
    my $self;
34
	$kp = GetMember(cardnumber=>$patron_id);
34
	$kp = GetMember(cardnumber=>$patron_id) || GetMember(userid=>$patron_id);
35
	$debug and warn "new Patron (GetMember): " . Dumper($kp);
35
	$debug and warn "new Patron (GetMember): " . Dumper($kp);
36
    unless (defined $kp) {
36
    unless (defined $kp) {
37
		syslog("LOG_DEBUG", "new ILS::Patron(%s): no such patron", $patron_id);
37
		syslog("LOG_DEBUG", "new ILS::Patron(%s): no such patron", $patron_id);
38
        return;
38
        return;
39
	}
39
	}
40
	$kp = GetMemberDetails(undef,$patron_id);
40
	$kp = GetMemberDetails($kp->{borrowernumber});
41
	$debug and warn "new Patron (GetMemberDetails): " . Dumper($kp);
41
	$debug and warn "new Patron (GetMemberDetails): " . Dumper($kp);
42
	my $pw        = $kp->{password};  ### FIXME - md5hash -- deal with . 
42
	my $pw        = $kp->{password};  ### FIXME - md5hash -- deal with . 
43
	my $flags     = $kp->{flags};     # or warn "Warning: No flags from patron object for '$patron_id'"; 
43
	my $flags     = $kp->{flags};     # or warn "Warning: No flags from patron object for '$patron_id'"; 
44
- 

Return to bug 8039