Lines 57-62
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 ); |
60 |
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } ); |
61 |
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } ); |
61 |
|
62 |
|
62 |
# Handle deletion from the Norwegian national patron database, if it is enabled |
63 |
# Handle deletion from the Norwegian national patron database, if it is enabled |
Lines 76-87
if ( C4::Context->preference('NorwegianPatronDBEnable') && C4::Context->preferen
Link Here
|
76 |
my $issues = GetPendingIssues($member); # FIXME: wasteful call when really, we only want the count |
77 |
my $issues = GetPendingIssues($member); # FIXME: wasteful call when really, we only want the count |
77 |
my $countissues = scalar(@$issues); |
78 |
my $countissues = scalar(@$issues); |
78 |
|
79 |
|
79 |
my $patron = Koha::Patrons->find( $member ); |
|
|
80 |
my $charges = $patron->account->non_issues_charges; |
80 |
my $charges = $patron->account->non_issues_charges; |
81 |
my $userenv = C4::Context->userenv; |
81 |
my $userenv = C4::Context->userenv; |
82 |
|
82 |
|
83 |
|
|
|
84 |
|
85 |
if ($patron->category->category_type eq "S") { |
83 |
if ($patron->category->category_type eq "S") { |
86 |
unless(C4::Auth::haspermission($userenv->{'id'},{'staffaccess'=>1})) { |
84 |
unless(C4::Auth::haspermission($userenv->{'id'},{'staffaccess'=>1})) { |
87 |
print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$member&error=CANT_DELETE_STAFF"); |
85 |
print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$member&error=CANT_DELETE_STAFF"); |
88 |
- |
|
|