Log in

View Full Version : how to get value constum user field


wouta
03-31-2009, 08:13 AM
Hi,

I need the follow on the hook lacation register_activate_process.

When a user click on the confirm link i want to know what hehas enterd in a costum userfield.

For to know that i do the fellow query:
$letter = $db->query("SELECT ".$vbulletin->options['newsletter_fieldname']." FROM `userfield` WHERE `userid`=".$vbulletin->userinfo['userid']."");
$var = $db->fetch_array($letter);


in my case its field5 what i need to know.

When i do echo $var['field5'] i get no but in the db i see yes.

I dont understand why i cant get the right valeu in $var['filed5']

Dismounted
03-31-2009, 11:05 AM
IIRC, the user is not logged in at that point, and therefore, $vbulletin->userinfo still shows up as a guest.