Bugzilla – Attachment 33160 Details for
Bug 13096
Send account notice with login details in more situations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13096: Send account notice when user completes self-registration
Bug-13096-Send-account-notice-when-user-completes-.patch (text/plain), 3.32 KB, created by
Marcel de Rooy
on 2014-11-03 14:29:38 UTC
(
hide
)
Description:
Bug 13096: Send account notice when user completes self-registration
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2014-11-03 14:29:38 UTC
Size:
3.32 KB
patch
obsolete
>From 35770c8a8cba3ffbbf581abf60f9317f7a9a1e19 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 27 Oct 2014 13:12:04 +0100 >Subject: [PATCH] Bug 13096: Send account notice when user completes > self-registration >Content-Type: text/plain; charset=utf-8 > >If you have enabled AutoEmailOPACUser, a notice is sent to a patron at >creation time. This patch will make Koha send a notice when someone >self-registers and submits or follows the verification link. The usercode >and password are prefilled on the form, but many patrons will find it >helpful to have them in a mail. > >Instead of creating a new pref for this specific case, I have chosen to >extend pref AutoEmailOpacUser. These situations are very similar. The pref >text is adjusted in a follow-up. > >Note: If the user does not enter an email address, he will not receive any >notice. (No verification link either.) > >Test plan: >[1] Enable the prefs AutoEmailOPACUser and PatronSelfRegistration. >[2] Enable PatronSelfRegistrationVerifyByEmail. >[3] Self-register an account. Verify the account with the link in the mail. > Check that you receive another mail with account details now. >[4] Disable PatronSelfRegistrationVerifyByEmail. >[5] Self-register again. Check if you receive a mail when submitting. >--- > opac/opac-memberentry.pl | 10 ++++++++++ > opac/opac-registration-verify.pl | 10 ++++++++++ > 2 files changed, 20 insertions(+), 0 deletions(-) > >diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl >index 8ca517b..377f2a7 100755 >--- a/opac/opac-memberentry.pl >+++ b/opac/opac-memberentry.pl >@@ -22,6 +22,7 @@ use Digest::MD5 qw( md5_base64 md5_hex ); > use String::Random qw( random_string ); > > use C4::Auth; >+use C4::Letters qw/SendAlerts/; > use C4::Output; > use C4::Members; > use Koha::Borrower::Modifications; >@@ -153,6 +154,15 @@ if ( $action eq 'create' ) { > C4::Context->preference( > 'PatronSelfRegistrationAdditionalInstructions') > ); >+ if( C4::Context->preference('AutoEmailOPACUser') ) { >+ my $external = { >+ borrowernumber => $borrowernumber, >+ emailaddr => $borrower{email}||$borrower{emailpro}, >+ branchcode => $borrower{branchcode}, >+ password => $password, >+ }; >+ SendAlerts ( 'members', $external, "ACCTDETAILS" ); >+ } > } > } > } >diff --git a/opac/opac-registration-verify.pl b/opac/opac-registration-verify.pl >index 05b258f..51a80e2 100755 >--- a/opac/opac-registration-verify.pl >+++ b/opac/opac-registration-verify.pl >@@ -20,6 +20,7 @@ use Modern::Perl; > use CGI; > > use C4::Auth; >+use C4::Letters qw/SendAlerts/; > use C4::Output; > use C4::Members; > use Koha::Borrower::Modifications; >@@ -65,6 +66,15 @@ if ( $m->Verify() ) { > C4::Context->preference( > 'PatronSelfRegistrationAdditionalInstructions') > ); >+ if( C4::Context->preference('AutoEmailOPACUser') ) { >+ my $external = { >+ borrowernumber => $borrowernumber, >+ emailaddr => $borrower->{email}||$borrower->{emailpro}, >+ branchcode => $borrower->{branchcode}, >+ password => $password, >+ }; >+ SendAlerts ( 'members', $external, "ACCTDETAILS" ); >+ } > } > > } >-- >1.7.7.6
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 13096
:
32475
|
32476
|
33028
|
33158
|
33159
|
33160
|
33161
|
33162
|
40073