Bug 18124: add to members/deletemem.pl
This commit is contained in:
parent
cf3b67032e
commit
e1294b6d91
|
|
@ -147,19 +147,15 @@ if ( $op eq 'delete_confirm' or $countissues > 0 or $flags->{'CHARGES'} or $is_
|
|||
if ( not $countissues > 0 and not $flags->{CHARGES} ne '' and not $is_guarantor and not $deletelocal == 0 ) {
|
||||
$template->param(
|
||||
op => 'delete_confirm',
|
||||
csrf_token => Koha::Token->new->generate_csrf(
|
||||
{ id => C4::Context->userenv->{id},
|
||||
secret => md5_base64( C4::Context->config('pass') ),
|
||||
}
|
||||
),
|
||||
csrf_token => Koha::Token->new->generate_csrf({ session_id => scalar $input->cookie('CGISESSID') }),
|
||||
);
|
||||
}
|
||||
} elsif ( $op eq 'delete_confirmed' ) {
|
||||
|
||||
die "Wrong CSRF token"
|
||||
unless Koha::Token->new->check_csrf({
|
||||
id => C4::Context->userenv->{id},
|
||||
secret => md5_base64( C4::Context->config('pass') ),
|
||||
|
||||
unless Koha::Token->new->check_csrf( {
|
||||
session_id => $input->cookie('CGISESSID'),
|
||||
token => scalar $input->param('csrf_token'),
|
||||
});
|
||||
MoveMemberToDeleted($member);
|
||||
|
|
|
|||
Loading…
Reference in New Issue