Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 24 May 2017, 19:02
RaYdeN.ADM's Avatar
RaYdeN.ADM RaYdeN.ADM is offline
 
Join Date: May 2006
Location: Los Angeles, CA (US)
Real name: Paul Rayden
Question Auto-select usergroup depending on registration option?

Hello, do you have any idea how to make these changes from a plugin ?.

https://www.vbulletin.org/forum/showthread.php?t=267585

I use version 4.2.4 and these steps do not work for me. Also I see wrong edit directly from php, I would like it to be from a plugin.

my field5:


my new group 16:


Thx!
Reply With Quote
  #2  
Old 25 May 2017, 22:13
grey_goose grey_goose is offline
 
Join Date: Jun 2009
Someone really should mark that as broken. I tried using it as well (15+ minutes) and ended up just writing a trigger (2 minutes) on my user table.

You could probably also write a plugin at register_addmember_complete.
Reply With Quote
  #3  
Old 25 May 2017, 23:21
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Originally Posted by grey_goose View Post
Someone really should mark that as broken. I tried using it as well (15+ minutes) and ended up just writing a trigger (2 minutes) on my user table.

You could probably also write a plugin at register_addmember_complete.
After a review of the "register.php" script, it appears the best hook location might be at "register_addmember_process"...I will try my hand at putting together a product that allows defining profile fields that will determine a new user's usergroup.
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #4  
Old 26 May 2017, 06:35
RaYdeN.ADM's Avatar
RaYdeN.ADM RaYdeN.ADM is offline
 
Join Date: May 2006
Location: Los Angeles, CA (US)
Real name: Paul Rayden
Originally Posted by MarkFL View Post
After a review of the "register.php" script, it appears the best hook location might be at "register_addmember_process"...I will try my hand at putting together a product that allows defining profile fields that will determine a new user's usergroup.
It would be great to have a plug that performs this function.


Waiting here
Reply With Quote
  #5  
Old 30 May 2017, 02:46
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Sorry for the delay...I was a bit under the weather over the weekend. Anyway, I have attached a simple product for you to test.

The product has two settings, one which allows you to enable/disable it (the default value is "disabled" so you will need to enable it first.

The second setting allows you to define the custom profile fields and the usergroupids associated with the possible values from that profile field.

For example, I used a single-line text profile field, and if a new user enters one of these strings:
  • Administrator
  • Global Moderator
  • Moderator

Then they are moved to that usergroup once registration is completed. The definition I used is:

field5|Administrator,6|Global Moderator,5|Moderator,7

Please let me know if you have any issues, and/or would like any additional features.
Attached Files
File Type: xml product-markflregisterusergroup.xml (3.3 KB, 2 views)
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #6  
Old 30 May 2017, 04:50
RaYdeN.ADM's Avatar
RaYdeN.ADM RaYdeN.ADM is offline
 
Join Date: May 2006
Location: Los Angeles, CA (US)
Real name: Paul Rayden
Nice work, thanks!

work = ok
Reply With Quote
  #7  
Old 30 May 2017, 04:55
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Originally Posted by RaYdeN.ADM View Post
Nice work, thanks!

work = ok
Okay, good deal. I will publish this officially soon, after perhaps adding additional features if I think of any, and I will cite you as co-author since it was your request.
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #8  
Old 01 Jun 2017, 02:23
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
I have published a more robust version here:

Auto-Select Usergroup Based On Profile Field(s)
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #9  
Old 01 Jun 2017, 02:41
RaYdeN.ADM's Avatar
RaYdeN.ADM RaYdeN.ADM is offline
 
Join Date: May 2006
Location: Los Angeles, CA (US)
Real name: Paul Rayden
Good work!
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Integration with vBulletin Select Usergroup on registration lympboy vBulletin 4.x Template Modifications 37 28 Apr 2014 22:34



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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


New To Site? Need Help?

All times are GMT. The time now is 05:38.

Layout Options | Width: Wide Color: