anon user creation didn't use defaults for yes/no fields
This commit is contained in:
parent
202643d9b4
commit
f2d27f96e3
3 changed files with 8 additions and 3 deletions
|
|
@ -6,6 +6,7 @@
|
|||
- fix: WebGUI::Group->new doesn't check group validity
|
||||
- add form element template variables for event user defined fields
|
||||
- fix: File Pile doesn't have save and commit button
|
||||
- fix: Anonymous user creation doesn't use default values for yes/no fields
|
||||
|
||||
7.4.7
|
||||
- fix: misspelled i18n in webgui password recovery
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ sub createAccountSave {
|
|||
}
|
||||
}
|
||||
$error .= $self->error unless($self->_isValidPassword($password,$passConfirm));
|
||||
my ($profile, $temp, $warning) = WebGUI::Operation::Profile::validateProfileData($self->session);
|
||||
my ($profile, $temp, $warning) = WebGUI::Operation::Profile::validateProfileData($self->session, {regOnly => 1});
|
||||
$error .= $temp;
|
||||
|
||||
return $self->createAccount($error) unless ($error eq "");
|
||||
|
|
|
|||
|
|
@ -150,11 +150,15 @@ warning if it is a duplicate.
|
|||
|
||||
sub validateProfileData {
|
||||
my $session = shift;
|
||||
my %data = ();
|
||||
my $opts = shift || {};
|
||||
my $regOnly = $opts->{regOnly};
|
||||
my %data = ();
|
||||
my $error = "";
|
||||
my $warning = "";
|
||||
my $i18n = WebGUI::International->new($session);
|
||||
foreach my $field (@{WebGUI::ProfileField->getEditableFields($session)}) {
|
||||
my $fields = $regOnly ? WebGUI::ProfileField->getRegistrationFields($session)
|
||||
: WebGUI::ProfileField->getEditableFields($session);
|
||||
foreach my $field (@$fields) {
|
||||
my $fieldValue = $field->formProcess;
|
||||
if (ref $fieldValue eq "ARRAY") {
|
||||
$data{$field->getId} = $$fieldValue[0];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue