Bug 20629: (follow-up) fix reverse_col value
[koha.git] / members / member-password.pl
index 6a07825..e886c41 100755 (executable)
@@ -78,10 +78,10 @@ if ( $newpassword and not @errors) {
             token  => scalar $input->param('csrf_token'),
         });
 
-    my $digest = Koha::AuthUtils::hash_password( scalar $input->param('newpassword') );
     my $uid    = $input->param('newuserid') || $bor->{userid};
+    my $password = $input->param('newpassword');
     my $dbh    = C4::Context->dbh;
-    if ( Koha::Patrons->find( $member )->update_password($uid, $digest) ) {
+    if ( Koha::Patrons->find( $member )->update_password($uid, $password) ) {
         $template->param( newpassword => $newpassword );
         if ( $destination eq 'circ' ) {
             print $input->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=$cardnumber");
@@ -95,14 +95,6 @@ if ( $newpassword and not @errors) {
     }
 }
 
-if ( $category_type eq 'C') {
-    my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
-    $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
-    $template->param( 'catcode' => $patron_categories->next->categorycode )  if $patron_categories->count == 1;
-}
-
-$template->param( adultborrower => 1 ) if ( $category_type =~ /^(A|I)$/ );
-
 if ( C4::Context->preference('ExtendedPatronAttributes') ) {
     my $attributes = GetBorrowerAttributes( $bor->{'borrowernumber'} );
     $template->param(
@@ -114,7 +106,6 @@ if ( C4::Context->preference('ExtendedPatronAttributes') ) {
 $template->param(
     patron                     => $patron,
     destination                => $destination,
-    is_child                   => ( $category_type eq 'C' ),
     csrf_token                 => Koha::Token->new->generate_csrf({ session_id => scalar $input->cookie('CGISESSID'), }),
 );