Lines 119-127
my $borrowernumber = $input->param('borrowernumber');
Link Here
|
119 |
my $error = $input->param('error'); |
119 |
my $error = $input->param('error'); |
120 |
$template->param( error => $error ) if ( $error ); |
120 |
$template->param( error => $error ) if ( $error ); |
121 |
|
121 |
|
122 |
my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in"; |
|
|
123 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
122 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
124 |
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } ); |
123 |
my $userenv = C4::Context->userenv; |
|
|
124 |
if ( $userenv and $userenv->{number} ) { # Allow DB user to create a superlibrarian patron |
125 |
my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in"; |
126 |
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } ); |
127 |
} |
125 |
|
128 |
|
126 |
my $issues = $patron->checkouts; |
129 |
my $issues = $patron->checkouts; |
127 |
my $balance = $patron->account->balance; |
130 |
my $balance = $patron->account->balance; |
Lines 196-202
$bor{'borrowernumber'} = $borrowernumber;
Link Here
|
196 |
# Converts the branchcode to the branch name |
199 |
# Converts the branchcode to the branch name |
197 |
my $samebranch; |
200 |
my $samebranch; |
198 |
if ( C4::Context->preference("IndependentBranches") ) { |
201 |
if ( C4::Context->preference("IndependentBranches") ) { |
199 |
my $userenv = C4::Context->userenv; |
|
|
200 |
if ( C4::Context->IsSuperLibrarian() ) { |
202 |
if ( C4::Context->IsSuperLibrarian() ) { |
201 |
$samebranch = 1; |
203 |
$samebranch = 1; |
202 |
} |
204 |
} |
203 |
- |
|
|