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

(-)a/members/deletemem.pl (-4 / +10 lines)
Lines 128-138 if ( $op eq 'delete_confirm' or $countissues > 0 or $debits or $is_guarantor ) { Link Here
128
            session_id => $input->cookie('CGISESSID'),
128
            session_id => $input->cookie('CGISESSID'),
129
            token  => scalar $input->param('csrf_token'),
129
            token  => scalar $input->param('csrf_token'),
130
        });
130
        });
131
131
    my $patron = Koha::Patrons->find( $member );
132
    my $patron = Koha::Patrons->find( $member );
132
    $patron->move_to_deleted;
133
133
    try {
134
    try {
134
        $patron->delete;
135
        my $schema = Koha::Database->new->schema;
135
        print $input->redirect("/cgi-bin/koha/members/members-home.pl");
136
        $schema->txn_do(
137
            sub {
138
                $patron->move_to_deleted;
139
                $patron->delete;
140
                print $input->redirect( "/cgi-bin/koha/members/members-home.pl" );
141
            }
142
        );
136
    }
143
    }
137
    catch {
144
    catch {
138
        if ( $_->isa('Koha::Exceptions::Patron::FailedDeleteAnonymousPatron') ) {
145
        if ( $_->isa('Koha::Exceptions::Patron::FailedDeleteAnonymousPatron') ) {
139
- 

Return to bug 27145