|
Lines 136-141
sub add {
Link Here
|
| 136 |
|
136 |
|
| 137 |
my $patron = Koha::Patron->new_from_api( $c->validation->param('body') )->store; |
137 |
my $patron = Koha::Patron->new_from_api( $c->validation->param('body') )->store; |
| 138 |
|
138 |
|
|
|
139 |
if ( C4::Context->preference('EnhancedMessagingPreferences') ) { |
| 140 |
C4::Members::Messaging::SetMessagingPreferencesFromDefaults( |
| 141 |
{ |
| 142 |
borrowernumber => $patron->borrowernumber, |
| 143 |
categorycode => $patron->categorycode, |
| 144 |
} |
| 145 |
); |
| 146 |
} |
| 147 |
|
| 139 |
$c->res->headers->location( $c->req->url->to_string . '/' . $patron->borrowernumber ); |
148 |
$c->res->headers->location( $c->req->url->to_string . '/' . $patron->borrowernumber ); |
| 140 |
return $c->render( |
149 |
return $c->render( |
| 141 |
status => 201, |
150 |
status => 201, |
| 142 |
- |
|
|