Lines 55-61
my $member = $input->param('member');
Link Here
|
55 |
#Do not delete yourself... |
55 |
#Do not delete yourself... |
56 |
if ($borrowernumber == $member ) { |
56 |
if ($borrowernumber == $member ) { |
57 |
print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$member&error=CANT_DELETE_YOURSELF"); |
57 |
print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$member&error=CANT_DELETE_YOURSELF"); |
58 |
exit 1; |
58 |
exit 0; # Exit without error |
59 |
} |
59 |
} |
60 |
|
60 |
|
61 |
# Handle deletion from the Norwegian national patron database, if it is enabled |
61 |
# Handle deletion from the Norwegian national patron database, if it is enabled |
Lines 84-95
my $userenv = C4::Context->userenv;
Link Here
|
84 |
if ($bor->{category_type} eq "S") { |
84 |
if ($bor->{category_type} eq "S") { |
85 |
unless(C4::Auth::haspermission($userenv->{'id'},{'staffaccess'=>1})) { |
85 |
unless(C4::Auth::haspermission($userenv->{'id'},{'staffaccess'=>1})) { |
86 |
print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$member&error=CANT_DELETE_STAFF"); |
86 |
print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$member&error=CANT_DELETE_STAFF"); |
87 |
exit 1; |
87 |
exit 0; # Exit without error |
88 |
} |
88 |
} |
89 |
} else { |
89 |
} else { |
90 |
unless(C4::Auth::haspermission($userenv->{'id'},{'borrowers'=>1})) { |
90 |
unless(C4::Auth::haspermission($userenv->{'id'},{'borrowers'=>1})) { |
91 |
print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$member&error=CANT_DELETE"); |
91 |
print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$member&error=CANT_DELETE"); |
92 |
exit 1; |
92 |
exit 0; # Exit without error |
93 |
} |
93 |
} |
94 |
} |
94 |
} |
95 |
|
95 |
|
Lines 98-104
if (C4::Context->preference("IndependentBranches")) {
Link Here
|
98 |
if ( !C4::Context->IsSuperLibrarian() && $bor->{'branchcode'}){ |
98 |
if ( !C4::Context->IsSuperLibrarian() && $bor->{'branchcode'}){ |
99 |
unless ($userenv->{branch} eq $bor->{'branchcode'}){ |
99 |
unless ($userenv->{branch} eq $bor->{'branchcode'}){ |
100 |
print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$member&error=CANT_DELETE_OTHERLIBRARY"); |
100 |
print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$member&error=CANT_DELETE_OTHERLIBRARY"); |
101 |
exit; |
101 |
exit 0; # Exit without error |
102 |
} |
102 |
} |
103 |
} |
103 |
} |
104 |
} |
104 |
} |
Lines 165-171
if ( $op eq 'delete_confirm' or $countissues > 0 or $flags->{'CHARGES'} or $is_
Link Here
|
165 |
DelMember($member); |
165 |
DelMember($member); |
166 |
# TODO Tell the user everything went ok |
166 |
# TODO Tell the user everything went ok |
167 |
print $input->redirect("/cgi-bin/koha/members/members-home.pl"); |
167 |
print $input->redirect("/cgi-bin/koha/members/members-home.pl"); |
168 |
exit 1; |
168 |
exit 0; # Exit without error |
169 |
} |
169 |
} |
170 |
|
170 |
|
171 |
output_html_with_http_headers $input, $cookie, $template->output; |
171 |
output_html_with_http_headers $input, $cookie, $template->output; |
172 |
- |
|
|