From 097e2d5718fb275b741a19bf0556adaf43b23a4c Mon Sep 17 00:00:00 2001 From: tipaul Date: Fri, 19 Mar 2004 15:07:29 +0000 Subject: [PATCH] bugfix : a missing } was placed at a wrong place. The auth did not work anymore... --- C4/Auth.pm | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 2e622954ae..da92e5c520 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -350,8 +350,8 @@ sub checkpw { # my ($dbh, $userid, $password) = @_; # LDAP - my $sth=$dbh->prepare("select value from systempreferences where variable=?"); - $sth->execute("ldapserver"); +# my $sth=$dbh->prepare("select value from systempreferences where variable=?"); +# $sth->execute("ldapserver"); my $ldapserver = C4::Context->preferences('ldapserver'); if ($ldapserver) { my $ldapinfos = C4::Context->preferences('ldapinfos'); @@ -365,17 +365,18 @@ sub checkpw { # auth refused return 0; } else { - #get the cardnumber - my $sth=$dbh->prepare("select cardnumber from borrowers where userid=?"); - $sth->execute($userid); - if ($sth->rows) { - my $cardnumber = $sth->fetchrow; - #we have the cardnumber - return 1,$cardnumber; - } - if ($userid eq C4::Context->config('user') && $password eq C4::Context->config('pass')) { - # Koha superuser account - return 2; + #get the cardnumber + my $sth=$dbh->prepare("select cardnumber from borrowers where userid=?"); + $sth->execute($userid); + if ($sth->rows) { + my $cardnumber = $sth->fetchrow; + #we have the cardnumber + return 1,$cardnumber; + } + if ($userid eq C4::Context->config('user') && $password eq C4::Context->config('pass')) { + # Koha superuser account + return 2; + } } } # INTERNAL AUTH @@ -462,8 +463,6 @@ sub getborrowernumber { return 0; } -} - END { } # module clean-up code here (global destructor) 1; __END__ -- 2.39.5