PDA

View Full Version : Custom Profile Field Check


zylstra
12-20-2006, 11:54 PM
I'm trying to check for a custom profile field value, and change it if it is too high. So at the profile_updateprofile hook I have placed the following, none of which work. Could you tell me the code to get it to work? Thanks.
if ($vbulletin->GPC['field15'] > 10)
{
// $userdata->set_userfields(array(
// 'field15' => 9));
// $userdata->set('field15', 9);
// $vbulletin->userinfo['field15'] = 9;
}

zylstra
01-05-2007, 07:24 PM
I'm still looking for the solution to this.

noppid
01-05-2007, 08:55 PM
Try and let vB do the work...

if ($vbulletin->GPC['field15'] > 10)
{
$vbulletin->GPC['field15'] = 9;
}


I did not look up if you are using the correct GPC var however.

zylstra
01-15-2007, 06:31 PM
That didn't work. It didn't give an error, but it didn't reduce the variable. Maybe my first line is wrong also.