Bugzilla – Attachment 5465 Details for
Bug 6870
[enh] allow opac-userupdate.pl to use the patron's email as 'from' address
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Signed-off patch
0001-SIGNED-OFF-Bug-6870-enh-allow-opac-userupdate.pl-to-.patch (text/plain), 2.08 KB, created by
Owen Leonard
on 2011-09-19 19:59:00 UTC
(
hide
)
Description:
Signed-off patch
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2011-09-19 19:59:00 UTC
Size:
2.08 KB
patch
obsolete
>From 352efb3ed54f25ecbc7bfbea59e74838cf367e40 Mon Sep 17 00:00:00 2001 >From: Liz Rea <lrea@nekls.org> >Date: Wed, 14 Sep 2011 14:56:03 -0500 >Subject: [PATCH] [SIGNED-OFF] Bug 6870 [enh] - allow opac-userupdate.pl to use the patron's email as 'from' address >Content-Type: text/plain; charset="utf-8" > >Patch makes it so that Koha sends patron update emails from the first valid patron email address, instead of from the KohaAdmin or branch email address. > >This patch should make it so that libraries can directly reply to patrons regarding patron updates. > >To test: > >Create a patron with no email address, do a patron update and observe the to: and from: - they should both be the KohaAdminEmail address. > >Add an email address to that same patron, and send a patron update. Observe the to: and from: - the from: should be the first valid email address of the patron, to should be the KohaAdminEmail address. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > opac/opac-userupdate.pl | 7 ++++++- > 1 files changed, 6 insertions(+), 1 deletions(-) > >diff --git a/opac/opac-userupdate.pl b/opac/opac-userupdate.pl >index aa5858a..f8273ce 100755 >--- a/opac/opac-userupdate.pl >+++ b/opac/opac-userupdate.pl >@@ -48,6 +48,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > > # get borrower information .... > my ( $borr ) = GetMemberDetails( $borrowernumber ); >+my ( $patronemail ) = GetFirstValidEmailAddress($borrowernumber); > my $lib = GetBranchDetail($borr->{'branchcode'}); > > # handle the new information.... >@@ -80,6 +81,10 @@ if ( !$updateemailaddress || $updateemailaddress eq '' ) { > exit; > } > >+if ( !$patronemail || $patronemail eq '' ) { >+ $patronemail = $updateemailaddress; >+}; >+ > if ( $query->param('modify') ) { > > # get all the fields: >@@ -117,7 +122,7 @@ EOF > $message .= "\n\nThanks,\nKoha\n\n"; > my %mail = ( > To => $updateemailaddress, >- From => $updateemailaddress, >+ From => $patronemail, > Subject => "User Request for update of Record.", > Message => $message, > 'Content-Type' => 'text/plain; charset="utf8"', >-- >1.7.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6870
:
5432
| 5465