[Koha-cvs] CVS: koha member-password.pl,1.5,1.6
Mike Hansen
wolfpac444 at users.sourceforge.net
Tue May 27 08:51:57 CEST 2003
Update of /cvsroot/koha/koha
In directory sc8-pr-cvs1:/tmp/cvs-serv27800/koha
Modified Files:
member-password.pl
Log Message:
Fixed #465.
Index: member-password.pl
===================================================================
RCS file: /cvsroot/koha/koha/member-password.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** member-password.pl 8 Apr 2003 09:39:18 -0000 1.5
--- member-password.pl 27 May 2003 06:51:55 -0000 1.6
***************
*** 45,48 ****
--- 45,49 ----
}
+ my ($bor,$flags)=getpatroninformation(\%env, $member,'');
my $newpassword = $input->param('newpassword');
***************
*** 51,58 ****
my $uid = $input->param('newuserid');
my $dbh=C4::Context->dbh;
! my $sth=$dbh->prepare("update borrowers set userid=?, password=? where borrowernumber=?");
! $sth->execute($uid, $digest, $member);
} else {
- my ($bor,$flags)=getpatroninformation(\%env, $member,'');
my $userid = $bor->{'userid'};
--- 52,78 ----
my $uid = $input->param('newuserid');
my $dbh=C4::Context->dbh;
!
! #Make sure the userid chosen is unique. If it is not,
! #Then we need to tell the user and have them create a new one.
! my $sth2=$dbh->prepare("select * from borrowers where userid=?");
! $sth2->execute($uid);
!
! if ( $sth2->fetchrow ) {
! #The userid exists so we should display a warning.
! my $warn = 1;
! $template->param( warn => $warn,
! othernames => $bor->{'othernames'},
! surname => $bor->{'surname'},
! firstname => $bor->{'firstname'},
! userid => $bor->{'userid'},
! defaultnewpassword => $newpassword );
! } else {
! #Everything is good so we can update the information.
! my $sth=$dbh->prepare("update borrowers set userid=?, password=? where borrowernumber=?");
! $sth->execute($uid, $digest, $member);
! $template->param(newpassword => $newpassword);
! }
!
} else {
my $userid = $bor->{'userid'};
***************
*** 72,76 ****
}
! $template->param( member => $member, newpassword => $newpassword );
output_html_with_http_headers $input, $cookie, $template->output;
--- 92,96 ----
}
! $template->param( member => $member );
output_html_with_http_headers $input, $cookie, $template->output;
More information about the Koha-cvs
mailing list