vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Custom field for registration (https://vborg.vbsupport.ru/showthread.php?t=302759)

Grouper 09-28-2013 02:31 PM

Custom field for registration
 
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.

kh99 09-28-2013 07:40 PM

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?

kh99 09-29-2013 09:43 AM

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 [DATE]1380515163[/DATE] at [TIME]1380515163[/TIME] ---------------

I found a plugin on here that looks like it can do what I want. https://vborg.vbsupport.ru/showthread.php?t=82993


All times are GMT. The time now is 07:35 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01233 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete