|
Lines 53-59
my $patron = Koha::Patrons->find( $borrowernumber );
Link Here
|
| 53 |
if ( $logged_in_user->can_see_patron_infos($patron) ) { |
53 |
if ( $logged_in_user->can_see_patron_infos($patron) ) { |
| 54 |
if ( $reregistration eq 'y' ) { |
54 |
if ( $reregistration eq 'y' ) { |
| 55 |
# re-reregistration function to automatic calcul of date expiry |
55 |
# re-reregistration function to automatic calcul of date expiry |
| 56 |
output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); |
56 |
#FIXME: Can't use output_and_exit_if_error here because there's no $template available |
|
|
57 |
#output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); |
| 58 |
die "Wrong CSRF token" unless Koha::Token->new->check_csrf( |
| 59 |
{ |
| 60 |
session_id => scalar $input->cookie('CGISESSID'), |
| 61 |
token => scalar $input->param('csrf_token'), |
| 62 |
} |
| 63 |
); |
| 64 |
|
| 57 |
$dateexpiry = $patron->renew_account; |
65 |
$dateexpiry = $patron->renew_account; |
| 58 |
} else { |
66 |
} else { |
| 59 |
my $sth = $dbh->prepare("UPDATE borrowers SET debarred = ?, debarredcomment = '' WHERE borrowernumber = ?"); |
67 |
my $sth = $dbh->prepare("UPDATE borrowers SET debarred = ?, debarredcomment = '' WHERE borrowernumber = ?"); |