View | Details | Raw Unified | Return to bug 20287
Collapse All | Expand All

(-)a/members/memberentry.pl (-2 / +7 lines)
Lines 223-228 if ( $op eq 'insert' || $op eq 'modify' || $op eq 'save' || $op eq 'duplicate' ) Link Here
223
        qr/^\d+-DAYS/,
223
        qr/^\d+-DAYS/,
224
        qr/^patron_attr_/,
224
        qr/^patron_attr_/,
225
        qr/^csrf_token$/,
225
        qr/^csrf_token$/,
226
        qr/^add_debarment$/, qr/^debarred_expiration$/ # We already dealt with debarments previously
226
    );
227
    );
227
    for my $regexp (@keys_to_delete) {
228
    for my $regexp (@keys_to_delete) {
228
        for (keys %newdata) {
229
        for (keys %newdata) {
Lines 524-530 if ((!$nok) and $nodouble and ($op eq 'insert' or $op eq 'save')){ Link Here
524
            delete $newdata{'password'};
525
            delete $newdata{'password'};
525
            delete $newdata{'userid'};
526
            delete $newdata{'userid'};
526
        }
527
        }
527
        &ModMember(%newdata) unless scalar(keys %newdata) <= 1; # bug 4508 - avoid crash if we're not
528
529
        my $patron = Koha::Patrons->find( $borrowernumber );
530
        $newdata{debarredcomment} = $newdata{debarred_comment};
531
        delete $newdata{debarred_comment};
532
        delete $newdata{password2};
533
        $patron->set(\%newdata)->store if scalar(keys %newdata) > 1; # bug 4508 - avoid crash if we're not
528
                                                                # updating any columns in the borrowers table,
534
                                                                # updating any columns in the borrowers table,
529
                                                                # which can happen if we're only editing the
535
                                                                # which can happen if we're only editing the
530
                                                                # patron attributes or messaging preferences sections
536
                                                                # patron attributes or messaging preferences sections
531
- 

Return to bug 20287