[Koha-cvs] CVS: koha member-password.pl,1.9,1.10

MJ Ray slef at users.sourceforge.net
Fri Sep 26 14:08:04 CEST 2003


Update of /cvsroot/koha/koha
In directory sc8-pr-cvs1:/tmp/cvs-serv29145

Modified Files:
	member-password.pl 
Log Message:
I prefer this solution, able to keep blank userids.  Sorry for the repeated commits.

Index: member-password.pl
===================================================================
RCS file: /cvsroot/koha/koha/member-password.pl,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** member-password.pl	26 Sep 2003 12:01:41 -0000	1.9
--- member-password.pl	26 Sep 2003 12:08:01 -0000	1.10
***************
*** 53,64 ****
      my $dbh=C4::Context->dbh;
  
! 	if ($uid eq '') { $uid = $bor->{'userid'} }
! 	#Make sure the userid chosen is unique and not theirs. 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=? and borrowernumber != ?");
  	$sth2->execute($uid,$member);
  
! 	if ( $sth2->fetchrow ) {
! 	#The userid exists so we should display a warning.
  		my $warn = 1;
          $template->param( warn => $warn,
--- 53,63 ----
      my $dbh=C4::Context->dbh;
  
! 	#Make sure the userid chosen is unique and not theirs if non-empty. 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=? and borrowernumber != ?");
  	$sth2->execute($uid,$member);
  
! 	if ( ($uid ne '') && ($sth2->fetchrow) ) {
! 		#The userid exists so we should display a warning.
  		my $warn = 1;
          $template->param( warn => $warn,





More information about the Koha-cvs mailing list