koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/C4 Auth.pm,1.36.2.4,1.36.2.5


From: Henri-Damien LAURENT
Subject: [Koha-cvs] CVS: koha/C4 Auth.pm,1.36.2.4,1.36.2.5
Date: Fri, 30 Sep 2005 14:54:31 -0700

Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22444/C4

Modified Files:
      Tag: rel_2_2
        Auth.pm 
Log Message:
Adding search on cardnumber and not only on userid for userenv variable

Index: Auth.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Auth.pm,v
retrieving revision 1.36.2.4
retrieving revision 1.36.2.5
diff -C2 -r1.36.2.4 -r1.36.2.5
*** Auth.pm     26 Aug 2005 12:21:49 -0000      1.36.2.4
--- Auth.pm     30 Sep 2005 21:54:29 -0000      1.36.2.5
***************
*** 389,398 ****
                        }
                        if ($return == 1){
!                               my $sth=$dbh->prepare(
!                                       "select 
cardnumber,borrowernumber,userid,firstname,surname,flags,branchcode,emailaddress
!                                       from borrowers where userid=?"
!                               );
                                $sth->execute($userid);
!                               my 
($cardnumber,$bornum,$userid,$firstname,$surname,$userflags,$branchcode,$emailaddress)
 = $sth->fetchrow;
                                my $hash = C4::Context::set_userenv(
                                        $bornum,
--- 389,403 ----
                        }
                        if ($return == 1){
!                               my 
($cardnumber,$bornum,$userid,$firstname,$surname,$userflags,$branchcode,$emailaddress);
!                               my $sth=$dbh->prepare("select 
cardnumber,borrowernumber,userid,firstname,surname,flags,branchcode,emailaddress
 from borrowers where userid=?");
                                $sth->execute($userid);
!                               
($cardnumber,$bornum,$userid,$firstname,$surname,$userflags,$branchcode,$emailaddress)
 = $sth->fetchrow;
!                               warn 
"$cardnumber,$bornum,$userid,$firstname,$surname,$userflags,$branchcode,$emailaddress";
!                               unless ($cardnumber){
!                                       my $sth=$dbh->prepare("select 
cardnumber,borrowernumber,userid,firstname,surname,flags,branchcode,emailaddress
 from borrowers where cardnumber=?");
!                                       $sth->execute($cardnumber);
!                                       
($cardnumber,$bornum,$userid,$firstname,$surname,$userflags,$branchcode,$emailaddress)
 = $sth->fetchrow;
!                                       warn 
"$cardnumber,$bornum,$userid,$firstname,$surname,$userflags,$branchcode,$emailaddress";
!                               }
                                my $hash = C4::Context::set_userenv(
                                        $bornum,
***************
*** 405,408 ****
--- 410,414 ----
                                        $emailaddress,
                                );
+                               warn 
"$cardnumber,$bornum,$userid,$firstname,$surname,$userflags,$branchcode,$emailaddress";
                                $envcookie=$query->cookie(-name => 'userenv',
                                                -value => $hash,
***************
*** 415,419 ****
                                        C4::Context->config('user'),
                                        C4::Context->config('user'),
!                                       "",1,'address@hidden'
                                );
                                $envcookie=$query->cookie(-name => 'userenv',
--- 421,425 ----
                                        C4::Context->config('user'),
                                        C4::Context->config('user'),
!                                       
"",1,C4::Context->preference('KohaAdminEmailAddress')
                                );
                                $envcookie=$query->cookie(-name => 'userenv',




reply via email to

[Prev in Thread] Current Thread [Next in Thread]