From 321ab4caac75703be7cd8b8f3cf7f453967dfd6d Mon Sep 17 00:00:00 2001 From: Olli-Antti Kivilahti Date: Wed, 14 Jan 2026 17:12:24 +0200 Subject: [PATCH] Bug 37692: Self-registration verification cannot be done if OPACPublic is not allowed Registering new accounts need to be done even though OPAC requires login. To test: Set the following system preferences -1. Set PatronSelfRegistration to 'Allow' -2. Set PatronSelfRegistrationVerifyByEmail to 'Require' -3. Set OpacPublic to 'Disable' Before applying the patch, 1. Navigate to OPAC 2. Observe login screen is presented 3. Observe "Create an account" is present 4. Click "Create an account" 5. Fill in mandatory fields 6. Click "Submit" button 7. Grab your verification token from the database by using the following query: SELECT verification_token FROM borrower_modifications; 8. Go to /cgi-bin/koha/opac-registration-verify.pl?token=XXX where XXX is the verification_token 9. Observe login screen is presented and self-registration verification is still pending After applying the patch, the last step should be: 9. Observe "Registration pending", "Click the button below to confirm registration." 10. Click "Confirm" button 11. Observe "Registration complete!", "You have successfully registered your new account." --- opac/opac-registration-verify.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opac/opac-registration-verify.pl b/opac/opac-registration-verify.pl index 76386e02939..8a001caa928 100755 --- a/opac/opac-registration-verify.pl +++ b/opac/opac-registration-verify.pl @@ -70,7 +70,7 @@ if ( $rego_found template_name => "opac-registration-confirmation.tt", type => "opac", query => $cgi, - authnotrequired => C4::Context->preference("OpacPublic") ? 1 : 0, + authnotrequired => 1, } ); $template->param( "token" => $token ); @@ -113,7 +113,7 @@ if ( $rego_found template_name => "opac-registration-confirmation.tt", type => "opac", query => $cgi, - authnotrequired => C4::Context->preference("OpacPublic") ? 1 : 0, + authnotrequired => 1, } ); $template->param( "confirmed" => 1 ); -- 2.34.1