View | Details | Raw Unified | Return to bug 26067
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_26067_PatronEmailValidationMXrecord_add__system_preference.perl (+7 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do( "INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('PatronEmailValidationMXrecord','0','NULL','Mail Exchange (MX) records are DNS records that are necessary for delivering email to Patron.','YesNo')" );
4
5
    NewVersion( $DBversion, 22660, "Adds PatronEmailValidationMXrecord system preference");
6
}
7
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+6 lines)
Lines 790-795 OPAC: Link Here
790
            - "library patrons to register for an account via the OPAC."
790
            - "library patrons to register for an account via the OPAC."
791
            - "<br><strong>NOTE:</strong> This needs PatronSelfRegistrationDefaultCategory to be set to a valid patron category code."
791
            - "<br><strong>NOTE:</strong> This needs PatronSelfRegistrationDefaultCategory to be set to a valid patron category code."
792
        -
792
        -
793
            - pref: PatronEmailValidationMXrecord
794
              choices:
795
                  yes: Require
796
                  no: "Dont't require"
797
            - "Mail Exchange (MX) records are DNS records that are necessary for delivering email to Patron."
798
        -
793
            - pref: PatronSelfRegistrationVerifyByEmail
799
            - pref: PatronSelfRegistrationVerifyByEmail
794
              choices:
800
              choices:
795
                  yes: Require
801
                  yes: Require
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt (+1 lines)
Lines 78-83 Link Here
78
                        <ul>
78
                        <ul>
79
                            [% FOREACH field IN invalid_form_fields %]
79
                            [% FOREACH field IN invalid_form_fields %]
80
                                [% IF field == "email" %]<li>Contact information: <a href="#borrower_email">primary email address</a></li>[% END %]
80
                                [% IF field == "email" %]<li>Contact information: <a href="#borrower_email">primary email address</a></li>[% END %]
81
                                [% IF field == "mxrecordemail" %]<li>Contact information: <a href="#borrower_email">Invalid primary email address</a></li>[% END %]
81
                                [% IF field == "emailpro" %]<li>Contact information: <a href="#borrower_emailpro">secondary email address</a></li>[% END %]
82
                                [% IF field == "emailpro" %]<li>Contact information: <a href="#borrower_emailpro">secondary email address</a></li>[% END %]
82
                                [% IF field == "B_email" %]<li>Alternate address information: <a href="#borrower_B_email">email address</a></li>[% END %]
83
                                [% IF field == "B_email" %]<li>Alternate address information: <a href="#borrower_B_email">email address</a></li>[% END %]
83
                                [% IF field == "password_match" %]<li>Passwords do not match! <a href="#password">password</a></li>[% END %]
84
                                [% IF field == "password_match" %]<li>Passwords do not match! <a href="#password">password</a></li>[% END %]
(-)a/opac/opac-memberentry.pl (-1 / +2 lines)
Lines 432-437 sub CheckForInvalidFields { Link Here
432
    if ($borrower->{'email'}) {
432
    if ($borrower->{'email'}) {
433
        unless ( Email::Valid->address($borrower->{'email'}) ) {
433
        unless ( Email::Valid->address($borrower->{'email'}) ) {
434
            push(@invalidFields, "email");
434
            push(@invalidFields, "email");
435
        } elsif ( C4::Context->preference("PatronEmailValidationMXrecord") ) {
436
            push(@invalidFields, "mxrecordemail") if ( Email::Valid->address( -address => $borrower->{'email'}, -mxcheck => 1));
435
        } elsif ( C4::Context->preference("PatronSelfRegistrationEmailMustBeUnique") ) {
437
        } elsif ( C4::Context->preference("PatronSelfRegistrationEmailMustBeUnique") ) {
436
            my $patrons_with_same_email = Koha::Patrons->search( # FIXME Should be search_limited?
438
            my $patrons_with_same_email = Koha::Patrons->search( # FIXME Should be search_limited?
437
                {
439
                {
438
- 

Return to bug 26067