Bug 22048: Use set_password in Auth_with_ldap.pm
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 26 Dec 2018 16:19:05 +0000 (13:19 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 25 Jan 2019 20:15:31 +0000 (20:15 +0000)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
C4/Auth_with_ldap.pm

index b5876a0..d9841a8 100644 (file)
@@ -346,7 +346,7 @@ sub _do_changepassword {
 
     my $digest = hash_password($password);
     $debug and print STDERR "changing local password for borrowernumber=$borrowerid to '$digest'\n";
-    Koha::Patrons->find($borrowerid)->update_password( $userid, $password );
+    Koha::Patrons->find($borrowerid)->set_password({ password => $password, skip_validation => 1 });
 
     my ($ok, $cardnum) = checkpw_internal(C4::Context->dbh, $userid, $password);
     return $cardnum if $ok;