Bugzilla – Attachment 40877 Details for
Bug 11693
Default emailing preferences not loaded for self registering patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11693: Default emailing preferences not loaded for self registering patron
Bug-11693-Default-emailing-preferences-not-loaded-.patch (text/plain), 2.92 KB, created by
Jonathan Druart
on 2015-07-09 11:28:51 UTC
(
hide
)
Description:
Bug 11693: Default emailing preferences not loaded for self registering patron
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-07-09 11:28:51 UTC
Size:
2.92 KB
patch
obsolete
>From f1fa412ba6adf3140e51f268410390a68553356a Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Sun, 5 Jul 2015 13:17:02 +0200 >Subject: [PATCH] Bug 11693: Default emailing preferences not loaded for self > registering patron >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >The call to AddMember_Opac does not take care of the messaging prefs >when enhanced messaging is enabled. >This patch adds the call to handle_form_action to do that. > >Test plan: >Enable self registering patrons and enhanced messaging. >Check the (default) message prefs for the relevant patron category. At least >enable email for one notice. >Self-register a user with and without verification email enabled. >Check in both cases that the message prefs of the user conform to >those in the patron category. (So at least one enabled.) > >Followed test plan, works as expected. >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > opac/opac-memberentry.pl | 2 ++ > opac/opac-registration-verify.pl | 2 ++ > 2 files changed, 4 insertions(+) > >diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl >index 5a075ba..9a82fc6 100755 >--- a/opac/opac-memberentry.pl >+++ b/opac/opac-memberentry.pl >@@ -24,6 +24,7 @@ use String::Random qw( random_string ); > use C4::Auth; > use C4::Output; > use C4::Members; >+use C4::Form::MessagingPreferences; > use Koha::Borrower::Modifications; > use C4::Branch qw(GetBranchesLoop); > use C4::Scrubber; >@@ -146,6 +147,7 @@ if ( $action eq 'create' ) { > C4::Context->preference('OpacPasswordChange') ); > > my ( $borrowernumber, $password ) = AddMember_Opac(%borrower); >+ C4::Form::MessagingPreferences::handle_form_action($cgi, { borrowernumber => $borrowernumber }, $template, 1, C4::Context->preference('PatronSelfRegistrationDefaultCategory') ) if $borrowernumber && C4::Context->preference('EnhancedMessagingPreferences'); > > $template->param( password_cleartext => $password ); > $template->param( >diff --git a/opac/opac-registration-verify.pl b/opac/opac-registration-verify.pl >index eaaf52f..15d57cd 100755 >--- a/opac/opac-registration-verify.pl >+++ b/opac/opac-registration-verify.pl >@@ -22,6 +22,7 @@ use CGI qw ( -utf8 ); > use C4::Auth; > use C4::Output; > use C4::Members; >+use C4::Form::MessagingPreferences; > use Koha::Borrower::Modifications; > > my $cgi = new CGI; >@@ -56,6 +57,7 @@ if ( $m->Verify() ) { > > if ($borrowernumber) { > Koha::Borrower::Modifications->DelModifications({ verification_token => $token }); >+ C4::Form::MessagingPreferences::handle_form_action($cgi, { borrowernumber => $borrowernumber }, $template, 1, C4::Context->preference('PatronSelfRegistrationDefaultCategory') ) if C4::Context->preference('EnhancedMessagingPreferences'); > > $template->param( password_cleartext => $password ); > $template->param( >-- >2.1.0
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 11693
:
40792
|
40793
| 40877