Bug 19933: Move instantiation of in deletemem.pl
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
dc2339247b
commit
58dccaee26
|
|
@ -57,6 +57,7 @@ if ( $loggedinuser == $member ) {
|
|||
}
|
||||
|
||||
my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in";
|
||||
my $patron = Koha::Patrons->find( $member );
|
||||
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
|
||||
|
||||
# Handle deletion from the Norwegian national patron database, if it is enabled
|
||||
|
|
@ -76,12 +77,9 @@ if ( C4::Context->preference('NorwegianPatronDBEnable') && C4::Context->preferen
|
|||
my $issues = GetPendingIssues($member); # FIXME: wasteful call when really, we only want the count
|
||||
my $countissues = scalar(@$issues);
|
||||
|
||||
my $patron = Koha::Patrons->find( $member );
|
||||
my $charges = $patron->account->non_issues_charges;
|
||||
my $userenv = C4::Context->userenv;
|
||||
|
||||
|
||||
|
||||
if ($patron->category->category_type eq "S") {
|
||||
unless(C4::Auth::haspermission($userenv->{'id'},{'staffaccess'=>1})) {
|
||||
print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$member&error=CANT_DELETE_STAFF");
|
||||
|
|
|
|||
Loading…
Reference in New Issue