Lines 57-63
if ( $loggedinuser == $member ) {
Link Here
|
57 |
} |
57 |
} |
58 |
|
58 |
|
59 |
my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in"; |
59 |
my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in"; |
60 |
my $patron = Koha::Patrons->find( $member ); |
|
|
61 |
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } ); |
60 |
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } ); |
62 |
|
61 |
|
63 |
# Handle deletion from the Norwegian national patron database, if it is enabled |
62 |
# Handle deletion from the Norwegian national patron database, if it is enabled |
Lines 108-114
if (C4::Context->preference("IndependentBranches")) {
Link Here
|
108 |
my $op = $input->param('op') || 'delete_confirm'; |
107 |
my $op = $input->param('op') || 'delete_confirm'; |
109 |
my $dbh = C4::Context->dbh; |
108 |
my $dbh = C4::Context->dbh; |
110 |
my $is_guarantor = $dbh->selectrow_array("SELECT COUNT(*) FROM borrowers WHERE guarantorid=?", undef, $member); |
109 |
my $is_guarantor = $dbh->selectrow_array("SELECT COUNT(*) FROM borrowers WHERE guarantorid=?", undef, $member); |
111 |
if ( $op eq 'delete_confirm' or $countissues > 0 or $flags->{'CHARGES'} or $is_guarantor or $deletelocal == 0) { |
110 |
if ( $op eq 'delete_confirm' or $countissues > 0 or $charges or $is_guarantor or $deletelocal == 0) { |
112 |
|
111 |
|
113 |
$template->param( |
112 |
$template->param( |
114 |
patron => $patron, |
113 |
patron => $patron, |
115 |
- |
|
|