From bug 20287:
- $borrowernumber = C4::Members::AddMember(%borrower) or die "AddMember failed";
+ Koha::Patron->new( \%borrower )->store;
C4::Members::Messaging::SetMessagingPreferencesFromDefaults( { borrowernumber => $borrowernumber, categorycode => $borrower{'categorycode'} } );
$borrowernumber is not updated with the value of the newly created patron
This patch restores the previous behavior (as well as the die)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>