Bug 22047: Fix opac/opac-passwd.pl call
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 26 Dec 2018 15:42:28 +0000 (12:42 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 31 Jan 2019 16:48:42 +0000 (16:48 +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>
(cherry picked from commit d4726c71328c156be519f0f5cf2190a5d6c5c900)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Koha/Patron.pm
opac/opac-passwd.pl

index b10b116..870cb6b 100644 (file)
@@ -708,7 +708,7 @@ sub set_password {
 
                 my $password_length = length($password);
                 Koha::Exceptions::Password::TooShort->throw(
-                    { length => $password_length, min_length => $min_length } );
+                    length => $password_length, min_length => $min_length );
             }
             elsif ( $error eq 'has_whitespaces' ) {
                 Koha::Exceptions::Password::WhitespaceCharacters->throw();
index 60d79f6..4c72d30 100755 (executable)
@@ -60,7 +60,7 @@ if ( C4::Context->preference("OpacPasswordChange") ) {
                 $template->param( 'passwords_mismatch'   => '1' );
             } else {
                 try {
-                    $patron->set_password( $new_password );
+                    $patron->set_password({ password => $new_password });
                     $template->param( 'password_updated' => '1' );
                     $template->param( 'borrowernumber'   => $borrowernumber );
                 }