From 48856684f3d8fd5698a1a7d660ed717ebe4449b3 Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Wed, 19 Mar 2008 10:11:14 -0500 Subject: [PATCH] Assigning bug 1835 : change password would never log password change. Signed-off-by: Galen Charlton Signed-off-by: Joshua Ferraro --- C4/Members.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index a8fce9892c..6e0a0b21b2 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -766,12 +766,13 @@ sub changepassword { #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 $resultcode; my $sth = $dbh->prepare( "SELECT * FROM borrowers WHERE userid=? AND borrowernumber != ?"); $sth->execute( $uid, $member ); if ( ( $uid ne '' ) && ( my $row = $sth->fetchrow_hashref ) ) { - return 0; + $resultcode=0; } else { #Everything is good so we can update the information. @@ -779,10 +780,11 @@ sub changepassword { $dbh->prepare( "update borrowers set userid=?, password=? where borrowernumber=?"); $sth->execute( $uid, $digest, $member ); - return 1; + $resultcode=1; } logaction("MEMBERS", "CHANGE PASS", $member, "") if C4::Context->preference("BorrowersLog"); + return $resultcode; } -- 2.39.5