use Koha::Patron::Attribute::Types;
use Koha::Patron::Attributes;
use Koha::Patron::Images;
-use Koha::Patron::Modification;
-use Koha::Patron::Modifications;
use Koha::Patron::Categories;
use Koha::Token;
use Koha::AuthorisedValues;
};
}
}
+
+ # Notify library of new patron registration
+ my $notify_library = C4::Context->preference('EmailPatronRegistrations');
+ if ($notify_library) {
+ $patron->notify_library_of_registration($notify_library);
+ }
+
} else {
# FIXME Handle possible errors here
}
my $delete_candidates = {};
+ my $scrubber = C4::Scrubber->new();
while ( my ( $code, $value ) = $ea->() ) {
if ( any { $_ eq $code } @editable_attribute_types ) {
# It is an editable attribute
}
else {
# we've got a value
- push @attributes, { code => $code, attribute => $value };
+ push @attributes, { code => $code, attribute => $scrubber->scrub( $value ) };
# 'code' is no longer a delete candidate
delete $delete_candidates->{$code}