Bug 30664 - PatronSelfRegistration fields shouldn't make "email" field mandatory
Summary: PatronSelfRegistration fields shouldn't make "email" field mandatory
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-03 01:04 UTC by David Cook
Modified: 2022-05-12 23:58 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2022-05-03 01:04:33 UTC
At the moment, PatronSelfRegistrationVerifyByEmail forces you to use the "email" field for email verification regardless of the value of AutoEmailPrimaryAddress.
Comment 1 David Cook 2022-05-03 01:07:28 UTC
Admittedly this is challenging. If "AutoEmailPrimaryAddress" is set to "OFF", we don't know what field to make mandatory, since "OFF" uses "first_valid_email_address". 

If we knew the order of fields used in "first_valid_email_address" (using code logic and not hard-coding assumptions), I suppose we could make mandatory the "first" field checked in "first_valid_email_address"... 

I suppose we could also create a new system preference like "PatronSelfRegistrationVerifyEmailField"... that would require the fewest changes...
Comment 2 Andrew Fuerste-Henry 2022-05-12 12:16:57 UTC
Perhaps we make whichever field is indicated by the syspref mandatory? And if the syspref is off and we're using first_valid_email_address, then we make the form require a value in at least one of the email fields?
Comment 3 David Cook 2022-05-12 23:58:56 UTC
(In reply to Andrew Fuerste-Henry from comment #2)
> Perhaps we make whichever field is indicated by the syspref mandatory? And
> if the syspref is off and we're using first_valid_email_address, then we
> make the form require a value in at least one of the email fields?

Agreed although that'll also take the most work heh. I don't think I have a work mandate to do that work, unfortunately.