View Full Version : Getting Custom User Fields in Plugin
1qaz0okm13
01-03-2013, 02:59 PM
I am currently trying to make a plugin which checks a custom userfield against an external database during registration (register_addmember_process hook) and if the database does not contain the field the registration is denied. I have done 90% of it just I am unable to find out how to get custom userfields during registration. How can this be done?
You should be able to check the value of $vbulletin->GPC['userfield']['fieldX'] (where X is the actual field ID of the custom field you want to check). If it's a text field it will be text of course, otherwise the value may just be a number representing the selection. As always you should be careful when using the value in a query (use mysql_real_escape_string() or something like that).
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.