Bug 9374: (follow-up) add FIXME suggesting that use of a regexp is not the long-term...
[koha.git] / members / member-password.pl
index bed8fc4..ac25da5 100755 (executable)
@@ -8,6 +8,7 @@ use strict;
 use warnings;
 
 use C4::Auth;
+use Koha::AuthUtils;
 use C4::Output;
 use C4::Context;
 use C4::Members;
@@ -55,7 +56,7 @@ my $minpw = C4::Context->preference('minPasswordLength');
 push(@errors,'SHORTPASSWORD') if( $newpassword && $minpw && (length($newpassword) < $minpw ) );
 
 if ( $newpassword  && !scalar(@errors) ) {
-    my $digest=md5_base64($input->param('newpassword'));
+    my $digest=Koha::AuthUtils::hash_password($input->param('newpassword'));
     my $uid = $input->param('newuserid');
     my $dbh=C4::Context->dbh;
     if (changepassword($uid,$member,$digest)) {
@@ -88,7 +89,7 @@ if ( $newpassword  && !scalar(@errors) ) {
     }
        
 $template->param( adultborrower => 1 ) if ( $bor->{'category_type'} eq 'A' );
-my ($picture, $dberror) = GetPatronImage($bor->{'cardnumber'});
+my ($picture, $dberror) = GetPatronImage($bor->{'borrowernumber'});
 $template->param( picture => 1 ) if $picture;
 
 if (C4::Context->preference('ExtendedPatronAttributes')) {