From 76fb49ba37d8582f72b033940d92d96496b39303 Mon Sep 17 00:00:00 2001 From: Ryan Higgins Date: Mon, 24 Mar 2008 04:07:52 -0500 Subject: [PATCH] Send borrower mods to branchemail instead of syspref. Signed-off-by: Joshua Ferraro --- opac/opac-userupdate.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opac/opac-userupdate.pl b/opac/opac-userupdate.pl index fb74fb2079..7bf250e829 100755 --- a/opac/opac-userupdate.pl +++ b/opac/opac-userupdate.pl @@ -29,6 +29,7 @@ use C4::Circulation; use C4::Output; use C4::Dates qw/format_date/; use C4::Members; +use C4::Branch; my $query = new CGI; @@ -45,6 +46,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( # get borrower information .... my ( $borr, $flags ) = GetMemberDetails( $borrowernumber ); +my $lib = GetBranchDetail($borr->{'branchcode'}); # handle the new information.... # collect the form values and send an email. @@ -53,7 +55,8 @@ my @fields = ( 'fax', 'address','address2','city','zipcode','phone','mobile','fax','phonepro', 'emailaddress','B_streetaddress','B_city','B_zipcode','dateofbirth','sex' ); my $update; -my $updateemailaddress = C4::Context->preference('KohaAdminEmailAddress'); +my $updateemailaddress = $lib->{'branchemail'}; +$updateemailaddress = C4::Context->preference('KohaAdminEmailAddress') unless( $updateemailaddress =~ /\w+@\w+/); if ( $updateemailaddress eq '' ) { warn "KohaAdminEmailAddress system preference not set. Couldn't send patron update information for $borr->{'firstname'} $borr->{'surname'} (#$borrowernumber)\n"; -- 2.39.5