Assigning bug 1835 : change password would never log password change.
authorHenri-Damien LAURENT <henridamien@koha-fr.org>
Wed, 19 Mar 2008 15:11:14 +0000 (10:11 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Wed, 19 Mar 2008 16:08:44 +0000 (11:08 -0500)
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Members.pm

index a8fce98..6e0a0b2 100644 (file)
@@ -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;    
 }