Bugzilla – Attachment 125598 Details for
Bug 29005
Add option to send WELCOME notice for new patrons added via patron imports
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29005: Enable welcome email from patron imports
Bug-29005-Enable-welcome-email-from-patron-imports.patch (text/plain), 2.47 KB, created by
Martin Renvoize (ashimema)
on 2021-10-01 09:42:38 UTC
(
hide
)
Description:
Bug 29005: Enable welcome email from patron imports
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-10-01 09:42:38 UTC
Size:
2.47 KB
patch
obsolete
>From bec0b96e72dddb86d89698cfa3a7e1632168de9c Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 1 Oct 2021 10:40:50 +0100 >Subject: [PATCH] Bug 29005: Enable welcome email from patron imports > >This patch was updated from work done by Evangelische Theologische >Faculteit to allow the patron import to send welcome emails to users >when enabled. >--- > Koha/Patrons/Import.pm | 40 ++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 40 insertions(+) > >diff --git a/Koha/Patrons/Import.pm b/Koha/Patrons/Import.pm >index fe3fd80c11..b695c4a93b 100644 >--- a/Koha/Patrons/Import.pm >+++ b/Koha/Patrons/Import.pm >@@ -437,6 +437,46 @@ sub import_patrons { > }; > } > >+ if ($success) { >+ >+ # If 'AutoEmailOpacUser' syspref is on, email user their account details from the 'notice' >+ # that matches the user's branchcode. >+ if ( C4::Context->preference("AutoEmailOpacUser") == 1 >+ && $borrower{'userid'} >+ && $borrower{'password'} ) >+ { >+ #look for defined primary email address, if blank - attempt to use borr.email >+ #and borr.emailpro instead >+ my $emailaddr; >+ if ( C4::Context->preference("AutoEmailPrimaryAddress") ne 'OFF' >+ && $borrower{ C4::Context->preference( >+ "AutoEmailPrimaryAddress") } =~ /\w\@\w/ ) >+ { >+ $emailaddr = $borrower{ C4::Context->preference( >+ "AutoEmailPrimaryAddress") }; >+ } >+ elsif ( $borrower{email} =~ /\w\@\w/ ) { >+ $emailaddr = $borrower{email}; >+ } >+ elsif ( $borrower{emailpro} =~ /\w\@\w/ ) { >+ $emailaddr = $borrower{emailpro}; >+ } >+ elsif ( $borrower{B_email} =~ /\w\@\w/ ) { >+ $emailaddr = $borrower{B_email}; >+ } >+ >+ # if we manage to find a valid email address, send notice >+ if ($emailaddr) { >+ $borrower{emailaddr} = $emailaddr; >+ my $err; >+ eval { >+ $err = >+ SendAlerts( 'members', \%borrower, "ACCTDETAILS" ); >+ }; >+ } >+ } >+ } >+ > next LINE unless $success; > > # Add a guarantor if we are given a relationship >-- >2.20.1
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 29005
:
125598
|
126039
|
126040
|
131246
|
131247
|
131248
|
131249
|
131250
|
131251
|
131252
|
131253
|
131254
|
132782
|
132783
|
132784
|
132909
|
132910