I am trying to update two custom fields in the user table when profile data is updated (profile_updateprofile). I want to clean the posted textbox inputs before inserting into the database.
I have in userdata_start:
PHP Code:
$this->validfields['homepagetitle'] = array(TYPE_STR, REQ_NO);
$this->validfields['homepagedesc'] = array(TYPE_STR, REQ_NO);
And in profile_updateprofile:
PHP Code:
$vbulletin->input->clean_array_gpc('p', array(
'homepagetitle' => TYPE_STR,
'homepagedesc' => TYPE_STR,
));
$userdata->set('homepagetitle', $vbulletin->GPC['homepagetitle']);
$userdata->set('homepagedesc', $vbulletin->GPC['homepagedesc']);
However, this (obviously) erases the GPC variables already set (other profile info).