View Full Version : Custom field for registration
Grouper
09-28-2013, 02:31 PM
I have a database with email addresses and added a field to my user profile. I would like to on registration or profile save to check if the email address in my custom field is in that database and if so add the user to a usergroup.
I have seen a few tutorials but am not sure where to start with this. I am wanting to do a plugin so if a vBulletin update comes out I don't have to redo my work.
Any help would be appreciated.
I think you can probably use the hooks in the file class_dm_user.php (and maybe class_dm.php, the base class) to add a verification function for your new field, and in that function you should be able to do your check and set another field.
I can give you more details if you want. I have some code somewhere that does something similar.
Edit: Here's a mod that shows how to add a verify function to a user field: www.vbulletin.org/forum/showthread.php?t=283540
Grouper
09-29-2013, 12:06 AM
Thank you for the tip. Is there a specific tutorial on this forum or article I should read for adding this to the register page or have it triggered on registration?
I think you can add a User Profile Field that will show up on the registration page and in the profile once they're registered. Does that work for you, or are you trying to add it when a mod is installed?
Sorry, I don't know of any tutorial. There might be something related in the Articles forum.
Grouper
09-30-2013, 02:19 AM
Yes that idea will work. I just need it to process and look in the database when they register and if an entry is found, add them to a usergroup. I have searched google high and low on how to do this but cannot find anything.
--------------- Added 1380515163 at 1380515163 ---------------
I found a plugin on here that looks like it can do what I want. https://vborg.vbsupport.ru/showthread.php?t=82993
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.