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

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

Return to bug 27145