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

(-)a/members/memberentry.pl (-3 / +3 lines)
Lines 397-409 if ($op eq 'save' || $op eq 'insert'){ Link Here
397
  my $emailalt = $input->param('B_email');
397
  my $emailalt = $input->param('B_email');
398
398
399
  if ($emailprimary) {
399
  if ($emailprimary) {
400
      push (@errors, "ERROR_bad_email") if (!Email::Valid->address($emailprimary));
400
      push (@errors, "ERROR_bad_email") if (!Email::Valid->address(-address => $emailprimary, -fqdn => 0));
401
  }
401
  }
402
  if ($emailsecondary) {
402
  if ($emailsecondary) {
403
      push (@errors, "ERROR_bad_email_secondary") if (!Email::Valid->address($emailsecondary));
403
      push (@errors, "ERROR_bad_email_secondary") if (!Email::Valid->address(-address => $emailsecondary, fqdn => 0));
404
  }
404
  }
405
  if ($emailalt) {
405
  if ($emailalt) {
406
      push (@errors, "ERROR_bad_email_alternative") if (!Email::Valid->address($emailalt));
406
      push (@errors, "ERROR_bad_email_alternative") if (!Email::Valid->address(-address => $emailalt, fqdn => 0));
407
  }
407
  }
408
408
409
  if (C4::Context->preference('ExtendedPatronAttributes') and $input->param('setting_extended_patron_attributes')) {
409
  if (C4::Context->preference('ExtendedPatronAttributes') and $input->param('setting_extended_patron_attributes')) {
(-)a/opac/opac-memberentry.pl (-3 / +3 lines)
Lines 440-446 sub CheckForInvalidFields { Link Here
440
    my $borrower = shift;
440
    my $borrower = shift;
441
    my @invalidFields;
441
    my @invalidFields;
442
    if ($borrower->{'email'}) {
442
    if ($borrower->{'email'}) {
443
        unless ( Email::Valid->address($borrower->{'email'}) ) {
443
        unless ( Email::Valid->address(-address => $borrower->{'email'}, fqdn => 0) ) {
444
            push(@invalidFields, "email");
444
            push(@invalidFields, "email");
445
        } elsif ( C4::Context->preference("PatronSelfRegistrationEmailMustBeUnique") ) {
445
        } elsif ( C4::Context->preference("PatronSelfRegistrationEmailMustBeUnique") ) {
446
            my $patrons_with_same_email = Koha::Patrons->search( # FIXME Should be search_limited?
446
            my $patrons_with_same_email = Koha::Patrons->search( # FIXME Should be search_limited?
Lines 466-475 sub CheckForInvalidFields { Link Here
466
        delete $borrower->{'repeat_email'};
466
        delete $borrower->{'repeat_email'};
467
    }
467
    }
468
    if ($borrower->{'emailpro'}) {
468
    if ($borrower->{'emailpro'}) {
469
        push(@invalidFields, "emailpro") if (!Email::Valid->address($borrower->{'emailpro'}));
469
        push(@invalidFields, "emailpro") if (!Email::Valid->address(-address => $borrower->{'emailpro'}, fqdn => 0));
470
    }
470
    }
471
    if ($borrower->{'B_email'}) {
471
    if ($borrower->{'B_email'}) {
472
        push(@invalidFields, "B_email") if (!Email::Valid->address($borrower->{'B_email'}));
472
        push(@invalidFields, "B_email") if (!Email::Valid->address(-address => $borrower->{'B_email'}, fqdn => 0));
473
    }
473
    }
474
    if ( defined $borrower->{'password'}
474
    if ( defined $borrower->{'password'}
475
        and $borrower->{'password'} ne $borrower->{'password2'} )
475
        and $borrower->{'password'} ne $borrower->{'password2'} )
(-)a/opac/opac-shareshelf.pl (-2 / +1 lines)
Lines 300-306 sub load_template_vars { Link Here
300
sub IsEmailAddress {
300
sub IsEmailAddress {
301
301
302
    #TODO candidate for a module?
302
    #TODO candidate for a module?
303
    return Email::Valid->address( $_[0] ) ? 1 : 0;
303
    return Email::Valid->address( -address => $_[0], -fqdn => 0 ) ? 1 : 0;
304
}
304
}
305
305
306
sub randomlist {
306
sub randomlist {
307
- 

Return to bug 28017