Bugzilla – Attachment 69969 Details for
Bug 19845
Patron password is ignored during self-registration if PatronSelfRegistrationVerifyByEmail is enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19845: Do not generate a password if one is filled on selfreg
Bug-19845-Do-not-generate-a-password-if-one-is-fil.patch (text/plain), 2.09 KB, created by
Biblibre Sandboxes
on 2017-12-20 19:54:32 UTC
(
hide
)
Description:
Bug 19845: Do not generate a password if one is filled on selfreg
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2017-12-20 19:54:32 UTC
Size:
2.09 KB
patch
obsolete
>From b07a7ac6ebd0ec4cf00d3eb8632f7829a8f75226 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 20 Dec 2017 12:32:34 -0300 >Subject: [PATCH] Bug 19845: Do not generate a password if one is filled on > selfreg > >Bug 15343 allows patrons to choose their own passwords during self-registration. >But this does not work if the PatronSelfRegistrationVerifyByEmail preference is >set to "Require." If e-mail verification is required, whatever password the patron >supplied in the form is ignored, and they are given a randomly generated password >once they click on the verification link. > >Test plan: >1. Make sure there is a valid e-mail stored in the KohaAdminEmailAddress preference. >2. Set PatronSelfRegistration to Allow. >3. Set PatronSelfRegistrationVerifyByEmail to Require. >3. Be sure "password" is listed in PatronSelfRegistrationBorrowerMandatoryField and >NOT listed in PatronSelfRegistrationBorrowerUnwantedField. >4. Be sure there is a valid patron category in PatronSelfRegistrationDefaultCategory. >5. Set PatronSelfRegistrationPrefillForm to "Display and prefill" so that you can see >the generated password. > >Then fill out the self-registration form, include a valid e-mail address, and select >a password. Wait for the verification e-mail. Click on the link and you'll see that >the password you entered in the form is used. > >Signed-off-by: Arturo <alongoria@sll.texas.gov> >--- > opac/opac-memberentry.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl >index 33988c1..9ec5005 100755 >--- a/opac/opac-memberentry.pl >+++ b/opac/opac-memberentry.pl >@@ -169,7 +169,7 @@ if ( $action eq 'create' ) { > $verification_token = md5_hex( time().{}.rand().{}.$$ ); > } > >- $borrower{password} = Koha::AuthUtils::generate_password; >+ $borrower{password} = Koha::AuthUtils::generate_password unless $borrower{password}; > $borrower{verification_token} = $verification_token; > > Koha::Patron::Modification->new( \%borrower )->store(); >-- >2.7.4
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 19845
:
69950
|
69969
|
70009