Permalink
Browse files

Merge remote-tracking branch 'kc/new/bug_5995' into kcmaster

  • Loading branch information...
2 parents d139d40 + dcb4ac7 commit a118102d4e2d7cf6bc1157a560c52fd6deb6f7a7 @ranginui committed Oct 14, 2011
Showing with 7 additions and 7 deletions.
  1. +5 −5 C4/Auth.pm
  2. +2 −2 C4/Auth_with_ldap.pm
View
@@ -755,7 +755,7 @@ sub checkauth {
$info{'invalidCasLogin'} = 1 unless ($return);
} else {
my $retuserid;
- ( $return, $retuserid ) = checkpw( $dbh, $userid, $password, $query );
+ ( $return, $cardnumber, $retuserid ) = checkpw( $dbh, $userid, $password, $query );
$userid = $retuserid if ($retuserid ne '');
}
if ($return) {
@@ -1431,8 +1431,8 @@ sub checkpw {
my ( $dbh, $userid, $password, $query ) = @_;
if ($ldap) {
$debug and print "## checkpw - checking LDAP\n";
- my ($retval,$retcard) = checkpw_ldap(@_); # EXTERNAL AUTH
- ($retval) and return ($retval,$retcard);
+ my ($retval,$retcard,$retuserid) = checkpw_ldap(@_); # EXTERNAL AUTH
+ ($retval) and return ($retval,$retcard,$retuserid);
}
if ($cas && $query && $query->param('ticket')) {
@@ -1458,7 +1458,7 @@ sub checkpw {
C4::Context->set_userenv( "$borrowernumber", $userid, $cardnumber,
$firstname, $surname, $branchcode, $flags );
- return 1, $userid;
+ return 1, $cardnumber, $userid;
}
}
$sth =
@@ -1474,7 +1474,7 @@ sub checkpw {
C4::Context->set_userenv( $borrowernumber, $userid, $cardnumber,
$firstname, $surname, $branchcode, $flags );
- return 1, $userid;
+ return 1, $cardnumber, $userid;
}
}
if ( $userid && $userid eq C4::Context->config('user')
@@ -161,7 +161,7 @@ sub checkpw_ldap {
($cardnumber eq $c2) or warn "update_local returned cardnumber '$c2' instead of '$cardnumber'";
} else { # C1, D1
# maybe update just the password?
- return(1, $cardnumber); # FIXME dpavlin -- don't destroy ExtendedPatronAttributes
+ return(1, $cardnumber, $local_userid);
}
} elsif ($config{replicate}) { # A2, C2
$borrowernumber = AddMember(%borrower) or die "AddMember failed";
@@ -189,7 +189,7 @@ sub checkpw_ldap {
}
C4::Members::Attributes::SetBorrowerAttributes($borrowernumber, $extended_patron_attributes);
}
-return(1, $cardnumber);
+return(1, $cardnumber, $userid);
}
# Pass LDAP entry object and local cardnumber (userid).

0 comments on commit a118102

Please sign in to comment.