Users who self register without emails being required and leave the email entry blank, no long receive an error from duplicate emails. Fixed.

This commit is contained in:
Kaleb Murphy 2008-07-19 04:14:06 +00:00
parent 59f561eabe
commit 4c38fe9b81
3 changed files with 7 additions and 1 deletions

View file

@ -170,7 +170,7 @@ sub validateProfileData {
}
if ($field->isRequired && $data{$field->getId} eq "") {
$error .= '<li>'.$field->getLabel.' '.$i18n->get(451).'</li>';
} elsif ($field->getId eq "email" && isDuplicateEmail($session,$data{$field->getId})) {
} elsif ($field->getId eq "email" && isDuplicateEmail($session,$data{$field->getId}) && WebGUI::ProfileField->new($session, "email")->isRequired() ) {
$warning .= '<li>'.$i18n->get(1072).'</li>';
}
if ($field->getId eq "language" && $fieldValue ne "") {