Bug 8148: Only update the password if the LDAP password field was mapped
authorFrédérick <frederick.capovilla@libeo.com>
Wed, 19 Feb 2014 15:59:59 +0000 (10:59 -0500)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Thu, 7 Aug 2014 19:22:35 +0000 (16:22 -0300)
http://bugs.koha-community.org/show_bug.cgi?id=8148
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
C4/Auth_with_ldap.pm

index 4f47f66..cf120e6 100644 (file)
@@ -318,8 +318,8 @@ sub update_local {
         ((map {$borrower->{$_}} @keys), $borrowerid)
     );
 
-    # MODIFY PASSWORD/LOGIN
-    _do_changepassword($userid, $borrowerid, $password);
+    # MODIFY PASSWORD/LOGIN if password was mapped
+    _do_changepassword($userid, $borrowerid, $password) if $borrower->{'password'};
 }
 
 1;