Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
Auto-Select Usergroup Based On Profile Field(s) Details »»
Auto-Select Usergroup Based On Profile Field(s)
Version: 2.0, by MarkFL MarkFL is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Category: Profile Enhancements - Version: 4.2.x Rating:
Released: 05-31-2017 Last Update: Never Installs: 10
Uses Plugins
Translations  
No support by the author.

This product is in response to a request posted by RaYdeN.ADM here:

Auto-select usergroup depending on registration option?

Overview:

This product allows you to designate one or more of your profile fields as deciding which primary usergroup a user will be assigned. This can be done at registration and/or profile change (whether by user or admin).

To define any profile fields, in the setting labeled "Profile Field Definitions," enter the definition for each profile field on a separate line in the following format:

fieldX|Value1_1,...,Value1_n:usergroupid1|...|Valu e1_m,...,Valuen_m:usergroupidm

X is the number of the custom profile field you wish to use at registration/profile change to determine the new user's primary usergroup. If you wish to move all users not matching any of the given choices to a usergroup, then use "[other]" as the last choice.

Note: The first field value a user matches will determine their new usergroup, so ordering matters. List the definitions from most to least important.

For example, suppose you have a profile field (field10) that allows/requires your users to specify their favorite music group/performer. You could use the definition:

field10|Rush:6|Judas Priest,Iron Maiden,Korn:5|Justin Beiber:8|[other]:2

Any user choosing "Rush" would be an administrator, those choosing Judas Priest, Iron Maiden, or Korn would be super moderators, those choosing Justin Beiber would be banned, and any other choice would put them into the registered users group. Without the "[other]" option as a fallback, a user who has chosen for example "Rush" initially, and then later changes their choice to an choice not accounted for in your definition, such as Lady Gaga, would remain an administrator...and we wouldn't want that! So, if you are using profile changes as a trigger, and a user can edit this field, the "[other]" option is useful.

Compatibility:

Tested and working on VB 4.2.x and may work on all 4.x versions of vBulletin.

Backup/Warning:

This product does not alter the structure of your database, however it is always good practice to make regular backups and you should make a backup before installing ANY new product.

As always, products are USE AT YOUR OWN RISK. I will provide support and do my best to help but no absolute guarantee is offered.

To Install:
  1. Download and extract the attached .zip file.
  2. Follow AdminCP -> Plugins & Products -> Manage Products -> Add/Import Product.
  3. Click on "Choose File" and browse to the product .xml file that was packaged in the .zip file.
  4. Click "Import."
  5. You MUST enable the product in the settings before it will function.
  6. Configure the remaining settings to your liking. Each setting has a detailed explanation of its use.



Support for this product can be found here:

Download Now

File Type: zip MarkFL - Auto-Select Usergroup Based On Profile Field(s) v2.0.zip (4.3 KB, 23 views)

Screenshots

File Type: jpg markfl_autoselectusergroup.jpg (69.6 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
3 благодарности(ей) от:
RaYdeN.ADM, RichieBoy67, z3r0

Comments
  #2  
Old 06-01-2017, 12:40 AM
RaYdeN.ADM's Avatar
RaYdeN.ADM RaYdeN.ADM is offline
 
Join Date: May 2006
Location: Los Angeles, CA (US)
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice, oh thanks for credits :3
Reply With Quote
Благодарность от:
MarkFL
  #3  
Old 06-01-2017, 11:06 AM
grey_goose grey_goose is offline
 
Join Date: Jun 2009
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works like a charm. As usual, you the man!
Reply With Quote
Благодарность от:
MarkFL
  #4  
Old 07-04-2017, 11:09 PM
SilverBoy SilverBoy is offline
 
Join Date: Feb 2002
Location: Libya
Posts: 497
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice work as always Mark

I want to discus this scenario with you if you don't mind, and unfortunately I don't have a forum online to make a check.

I have a profile field which I want my users to divided to 2 usergroups depending on its value after registration, but the case is when a user complete the registration process, he moved directly to user awaiting email confirmation user group, so I want the user to move to one of these 2 groups after activation, is this possible?
Reply With Quote
  #5  
Old 07-05-2017, 01:40 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SilverBoy View Post
Nice work as always Mark

I want to discus this scenario with you if you don't mind, and unfortunately I don't have a forum online to make a check.

I have a profile field which I want my users to divided to 2 usergroups depending on its value after registration, but the case is when a user complete the registration process, he moved directly to user awaiting email confirmation user group, so I want the user to move to one of these 2 groups after activation, is this possible?
I'm fairly certain that's what will happen by default.
Reply With Quote
  #6  
Old 07-05-2017, 04:06 AM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a use for this! Thank you Mark!
Reply With Quote
Благодарность от:
MarkFL
  #7  
Old 07-05-2017, 10:29 PM
SilverBoy SilverBoy is offline
 
Join Date: Feb 2002
Location: Libya
Posts: 497
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarkFL View Post
I'm fairly certain that's what will happen by default.
Thank you Mark
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:03 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05032 seconds
  • Memory Usage 2,294KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (6)post_thanks_box_bit
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (2)postbit_attachment
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete