From b80ec6db88ac62b5d98ebfae019dbf160805cb0f Mon Sep 17 00:00:00 2001 From: slef Date: Fri, 26 Sep 2003 11:53:12 +0000 Subject: [PATCH] Fix for bug532: do not error if userid is left intact --- member-password.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/member-password.pl b/member-password.pl index 59bd245e19..4a5cd34090 100755 --- a/member-password.pl +++ b/member-password.pl @@ -52,10 +52,10 @@ if ( $newpassword ) { my $uid = $input->param('newuserid'); my $dbh=C4::Context->dbh; - #Make sure the userid chosen is unique. If it is not, + #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=?"); - $sth2->execute($uid); + 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. -- 2.39.2