|
Lines 76-82
my ($template, $loggedinuser, $cookie)
Link Here
|
| 76 |
}); |
76 |
}); |
| 77 |
|
77 |
|
| 78 |
my $borrowernumber = $input->param('borrowernumber'); |
78 |
my $borrowernumber = $input->param('borrowernumber'); |
| 79 |
my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in"; |
|
|
| 80 |
my $patron = Koha::Patrons->find($borrowernumber); |
79 |
my $patron = Koha::Patrons->find($borrowernumber); |
| 81 |
|
80 |
|
| 82 |
if ( C4::Context->preference('SMSSendDriver') eq 'Email' ) { |
81 |
if ( C4::Context->preference('SMSSendDriver') eq 'Email' ) { |
|
Lines 107-113
my $borrower_data;
Link Here
|
| 107 |
my $NoUpdateLogin; |
106 |
my $NoUpdateLogin; |
| 108 |
my $userenv = C4::Context->userenv; |
107 |
my $userenv = C4::Context->userenv; |
| 109 |
|
108 |
|
| 110 |
|
|
|
| 111 |
## Deal with debarments |
109 |
## Deal with debarments |
| 112 |
$template->param( |
110 |
$template->param( |
| 113 |
debarments => scalar GetDebarments( { borrowernumber => $borrowernumber } ) ); |
111 |
debarments => scalar GetDebarments( { borrowernumber => $borrowernumber } ) ); |
|
Lines 154-160
$template->param( "quickadd" => 1 ) if ( $quickadd );
Link Here
|
| 154 |
$template->param( "duplicate" => 1 ) if ( $op eq 'duplicate' ); |
152 |
$template->param( "duplicate" => 1 ) if ( $op eq 'duplicate' ); |
| 155 |
$template->param( "checked" => 1 ) if ( defined($nodouble) && $nodouble eq 1 ); |
153 |
$template->param( "checked" => 1 ) if ( defined($nodouble) && $nodouble eq 1 ); |
| 156 |
if ( $op eq 'modify' or $op eq 'save' or $op eq 'duplicate' ) { |
154 |
if ( $op eq 'modify' or $op eq 'save' or $op eq 'duplicate' ) { |
| 157 |
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } ); |
155 |
if ( $patron and $userenv and $userenv->{number} ) { # Allow DB user to create a superlibrarian patron |
|
|
156 |
my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in"; |
| 157 |
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } ); |
| 158 |
} |
| 159 |
|
| 158 |
$borrower_data = $patron->unblessed; |
160 |
$borrower_data = $patron->unblessed; |
| 159 |
$borrower_data->{category_type} = $patron->category->category_type; |
161 |
$borrower_data->{category_type} = $patron->category->category_type; |
| 160 |
} |
162 |
} |