chuanjer
01-18-2008, 05:25 AM
I've written a plugin-script which is triggererd by usercp_complete .it will then update the Profile_status which is 'field6' in vb Userfield.
$userdata =& datamanager_init('User', $vbulletin, ERRTYPE_ARRAY);
$userdata->set_existing($vbulletin->userinfo);
$userdata->set('field6','Yes');
$userdata->pre_save();
if (count($userdata->errors) > 0)
{
// Errors occurred. Do not proceed with the save.
// You may want to loop through $dataman->errors and
// display the results the user.
}
else
{
// No errors occurred.
// Proceed with the save (see the next step).
$userdata->save();
} Keep getting this error:
Fatal error: Field field6 is not defined in $validfields in class vb_datamanager_user in /includes/class_dm.php on line 485Whats wrong with the code?Thanks!
$userdata =& datamanager_init('User', $vbulletin, ERRTYPE_ARRAY);
$userdata->set_existing($vbulletin->userinfo);
$userdata->set('field6','Yes');
$userdata->pre_save();
if (count($userdata->errors) > 0)
{
// Errors occurred. Do not proceed with the save.
// You may want to loop through $dataman->errors and
// display the results the user.
}
else
{
// No errors occurred.
// Proceed with the save (see the next step).
$userdata->save();
} Keep getting this error:
Fatal error: Field field6 is not defined in $validfields in class vb_datamanager_user in /includes/class_dm.php on line 485Whats wrong with the code?Thanks!