From: Chris Sharp Date: Tue, 11 Sep 2012 15:51:03 +0000 (-0400) Subject: adding some flexibility with email X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=addaa18b5e33875bd31a670bce4f075f7f7449d0;p=contrib%2Fpines.git adding some flexibility with email --- diff --git a/change_reports_owner.pl b/change_reports_owner.pl index 38c86e6..8065af8 100755 --- a/change_reports_owner.pl +++ b/change_reports_owner.pl @@ -77,6 +77,18 @@ while ($sth->fetch) { print "The new user has ID $user_id2, barcode $new_barcode and is named $first_name2 $middle_name2 $last_name2 with an email address of $email2.\n"; } +print "The email address for user $last_name2 is $email2 - is this the correct email address to use (y/n)? "; +chomp($response = ); + +if ($response eq "n") { + print "Please enter the email address to be used: "; + chomp(my $email2 = ); + print "We will use $email2 as the email address.\n"; +} elsif ($response ne "y") { + print "Response invalid. Aborting.\n"; + exit(); +} + print "We will be transferring all report templates and report definitions from $first_name1 $middle_name1 $last_name1 ($old_barcode) to $first_name2 $middle_name2 $last_name2 ($new_barcode). Is that correct (y/n)? "; chomp($response = ); @@ -84,14 +96,14 @@ if ($response eq "n") { print "Aborting.\n"; # clean up $dbh->disconnect(); - exit() + exit(); } elsif ($response eq "y") { print "Beginning transfer of reports from $first_name1 $middle_name1 $last_name1 ($old_barcode) to $first_name2 $middle_name2 $last_name2 ($new_barcode)...\n"; } else { print "The response is not valid. Aborting.\n"; # clean up $dbh->disconnect(); - exit() + exit(); } my @tables = qw/reporter.template_folder reporter.report_folder reporter.output_folder reporter.template reporter.report/;