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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt (+3 lines)
Lines 64-69 Link Here
64
                                [% IF field == "password_match" %]<li>Passwords do not match! <a href="#password">password</a></li>[% END %]
64
                                [% IF field == "password_match" %]<li>Passwords do not match! <a href="#password">password</a></li>[% END %]
65
                                [% IF field == "password_invalid" %]<li>Password does not meet minimum requirements! <a href="#password">password</a></li>[% END %]
65
                                [% IF field == "password_invalid" %]<li>Password does not meet minimum requirements! <a href="#password">password</a></li>[% END %]
66
                                [% IF field == "password_spaces" %]<li>Password contains leading and/or trailing spaces! <a href="#password">password</a></li>[% END %]
66
                                [% IF field == "password_spaces" %]<li>Password contains leading and/or trailing spaces! <a href="#password">password</a></li>[% END %]
67
                                [% IF field == "duplicate_email" %]
68
                                    <li>This email address already exists in our database.</li>
69
                                [% END %]
67
                            [% END %]
70
                            [% END %]
68
                        </ul>
71
                        </ul>
69
                        Please correct the errors and resubmit.
72
                        Please correct the errors and resubmit.
(-)a/opac/opac-memberentry.pl (-2 / +8 lines)
Lines 330-336 sub CheckForInvalidFields { Link Here
330
    my $borrower = shift;
330
    my $borrower = shift;
331
    my @invalidFields;
331
    my @invalidFields;
332
    if ($borrower->{'email'}) {
332
    if ($borrower->{'email'}) {
333
        push(@invalidFields, "email") if (!Email::Valid->address($borrower->{'email'}));
333
        unless ( Email::Valid->address($borrower->{'email'}) ) {
334
            push(@invalidFields, "email");
335
        } elsif ( C4::Context->preference("PatronSelfRegistrationEmailMustBeUnique") ) {
336
            my $patrons_with_same_email = Koha::Patrons->search( { email => $borrower->{email} })->count;
337
            if ( $patrons_with_same_email ) {
338
                push @invalidFields, "duplicate_email";
339
            }
340
        }
334
    }
341
    }
335
    if ($borrower->{'emailpro'}) {
342
    if ($borrower->{'emailpro'}) {
336
        push(@invalidFields, "emailpro") if (!Email::Valid->address($borrower->{'emailpro'}));
343
        push(@invalidFields, "emailpro") if (!Email::Valid->address($borrower->{'emailpro'}));
337
- 

Return to bug 16275