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

(-)a/C4/SIP/ILS/Patron.pm (-3 / +2 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
	$kp = GetMember(cardnumber=>$patron_id);
40
	$kp = GetMember(cardnumber=>$patron_id) || GetMember(userid=>$patron_id);
41
	$debug and warn "new Patron (GetMember): " . Dumper($kp);
41
	$debug and warn "new Patron (GetMember): " . Dumper($kp);
42
    unless (defined $kp) {
42
    unless (defined $kp) {
43
		syslog("LOG_DEBUG", "new ILS::Patron(%s): no such patron", $patron_id);
43
		syslog("LOG_DEBUG", "new ILS::Patron(%s): no such patron", $patron_id);
44
		return undef;
44
		return undef;
45
	}
45
	}
46
	$kp = GetMemberDetails(undef,$patron_id);
46
	$kp = GetMemberDetails($kp->{borrowernumber});
47
	$debug and warn "new Patron (GetMemberDetails): " . Dumper($kp);
47
	$debug and warn "new Patron (GetMemberDetails): " . Dumper($kp);
48
	my $pw        = $kp->{password};  ### FIXME - md5hash -- deal with . 
48
	my $pw        = $kp->{password};  ### FIXME - md5hash -- deal with . 
49
	my $flags     = $kp->{flags};     # or warn "Warning: No flags from patron object for '$patron_id'"; 
49
	my $flags     = $kp->{flags};     # or warn "Warning: No flags from patron object for '$patron_id'"; 
50
- 

Return to bug 8039