updated profile field and profile category to use the new session api
This commit is contained in:
parent
388cd8f306
commit
02c5a65857
6 changed files with 102 additions and 46 deletions
|
|
@ -404,7 +404,7 @@ sub getOverrides {
|
|||
my $u = WebGUI::User->new($self->discernUserId);
|
||||
my @userPrefs = $self->getPrefFieldsToImport;
|
||||
foreach my $fieldId (@userPrefs) {
|
||||
my $field = WebGUI::ProfileField->new($fieldId);
|
||||
my $field = WebGUI::ProfileField->new($self->session,$fieldId);
|
||||
next unless $field;
|
||||
my $fieldName = $field->getId;
|
||||
my $fieldValue = $u->profileField($field->getId);
|
||||
|
|
@ -651,7 +651,7 @@ sub www_getUserPrefsForm {
|
|||
-value => 'saveUserPrefs'
|
||||
);
|
||||
foreach my $fieldId (@fielden) {
|
||||
my $field = WebGUI::ProfileField->new($fieldId);
|
||||
my $field = WebGUI::ProfileField->new($self->session,$fieldId);
|
||||
next unless $field;
|
||||
my $params = {};
|
||||
if (lc($field->get("fieldType")) eq 'textarea') {
|
||||
|
|
@ -712,7 +712,7 @@ sub www_saveUserPrefs {
|
|||
my $i18n = WebGUI::International->new($self->session);
|
||||
my $u = WebGUI::User->new($self->discernUserId);
|
||||
foreach my $fieldId (keys %{$session{form}}) {
|
||||
my $field = WebGUI::ProfileField->new($fieldId);
|
||||
my $field = WebGUI::ProfileField->new($self->session,$fieldId);
|
||||
next unless $field;
|
||||
$data{$field->getId} = $field->formProcess;
|
||||
if ($field->getId eq 'email' && WebGUI::Operation::Profile::isDuplicateEmail($data{$field->getId})) {
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ sub getEditForm {
|
|||
#-------------------------------------------------------------------
|
||||
sub initialize {
|
||||
my $self = shift;
|
||||
my $userPrefField = WebGUI::ProfileField->create($self->getId.'contentPositions',{
|
||||
my $userPrefField = WebGUI::ProfileField->create($self->session,$self->getId.'contentPositions',{
|
||||
label=>'\'Dashboard User Preference - Content Positions\'',
|
||||
visible=>0,
|
||||
protected=>1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue