Lines 207-219
if ( $action eq 'create' ) {
Link Here
|
207 |
$template->param( OpacPasswordChange => |
207 |
$template->param( OpacPasswordChange => |
208 |
C4::Context->preference('OpacPasswordChange') ); |
208 |
C4::Context->preference('OpacPasswordChange') ); |
209 |
|
209 |
|
210 |
my ( $borrowernumber, $password ) = AddMember_Opac(%borrower); |
210 |
my $patron = Koha::Patron->new( \%borrower )->store; |
211 |
C4::Members::Attributes::SetBorrowerAttributes( $borrowernumber, $attributes ); |
211 |
if ( $patron ) { |
212 |
C4::Form::MessagingPreferences::handle_form_action($cgi, { borrowernumber => $borrowernumber }, $template, 1, C4::Context->preference('PatronSelfRegistrationDefaultCategory') ) if $borrowernumber && C4::Context->preference('EnhancedMessagingPreferences'); |
212 |
C4::Members::Attributes::SetBorrowerAttributes( $patron->borrowernumber, $attributes ); |
|
|
213 |
if ( C4::Context->preference('EnhancedMessagingPreferences') ) { |
214 |
C4::Form::MessagingPreferences::handle_form_action( |
215 |
$cgi, |
216 |
{ borrowernumber => $patron->borrowernumber }, |
217 |
$template, |
218 |
1, |
219 |
C4::Context->preference('PatronSelfRegistrationDefaultCategory') |
220 |
); |
221 |
} |
213 |
|
222 |
|
214 |
$template->param( password_cleartext => $password ); |
223 |
$template->param( password_cleartext => $password ); |
215 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
224 |
$template->param( borrower => $patron->unblessed ); |
216 |
$template->param( borrower => $patron->unblessed ); |
225 |
} else { |
|
|
226 |
# FIXME Handle possible errors here |
227 |
} |
217 |
$template->param( |
228 |
$template->param( |
218 |
PatronSelfRegistrationAdditionalInstructions => |
229 |
PatronSelfRegistrationAdditionalInstructions => |
219 |
C4::Context->preference( |
230 |
C4::Context->preference( |