From 1bf5adf83714e03dc635a9317726b5f77a60fea5 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 2 Mar 2022 13:41:16 +0000 Subject: [PATCH] Bug 29005: Add support for the command line script This patch adds welcome email for new users support to the command line patron import tool. Signed-off-by: Kyle M Hall Signed-off-by: Katrin Fischer Signed-off-by: Fridolin Somers --- misc/import_patrons.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/misc/import_patrons.pl b/misc/import_patrons.pl index 85f7983cab..19b0ffab3f 100755 --- a/misc/import_patrons.pl +++ b/misc/import_patrons.pl @@ -30,6 +30,7 @@ my $csv_file; my $matchpoint; my $overwrite_cardnumber; my $overwrite_passwords; +my $welcome_new = 0; my %defaults; my $ext_preserve = 0; my $confirm; @@ -44,6 +45,7 @@ GetOptions( 'd|default=s' => \%defaults, 'o|overwrite' => \$overwrite_cardnumber, 'op|overwrite_passwords' => \$overwrite_passwords, + 'en|email-new' => \$welcome_new, 'p|preserve-extended-attributes' => \$ext_preserve, 'pf|preserve-field=s' => \@preserve_fields, 'v|verbose+' => \$verbose, @@ -68,6 +70,7 @@ my $return = $Import->import_patrons( overwrite_passwords => $overwrite_passwords, preserve_extended_attributes => $ext_preserve, preserve_fields => \@preserve_fields, + send_welcome => $welcome_new, dry_run => !$confirm, } ); @@ -145,6 +148,10 @@ Overwrite existing patrons with new data if a match is found Retain extended patron attributes for existing patrons being overwritten +=item B<-en|--email-new> + +Send the ACCTDETAILS welcome email to new users + =item B<-v|--verbose> Be verbose -- 2.39.5