The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
HOW DO I automatically add someone to a Usergroup based on a Profile field?
HOW DO I automatically add someone to a Usergroup based on a Profile field?
For example, if I have a single choice Profile field for, say, "Gender" with possible responses of "Male", "Female" and "Other", is there some way they could automatically be added as an "additional" member to my corresponding "male", "female" or "other" usergroup? (A 2nd, related question is how do I update my existing users based in this?) Thanks |
#2
|
||||
|
||||
Quote:
|
#3
|
||||
|
||||
Quote:
Yes (Plus I also need to update all of my exisiting userrs, as well.) |
#4
|
||||
|
||||
Quote:
Code:
if ($userinfo['coppauser'] OR ($vboptions['moderatenewmembers'] AND !$userinfo['posts'])) { // put user in moderated group $user['usergroupid'] = 4; } if (empty($user['usergroupid'])) { $user['usergroupid'] = 2; // sanity check } Code:
if ($userfield['field16']=='yes') // change this to suit you { $user['usergroupid'] = 12; // change this to suit you. } If you want to add them to a secondary group, the code will be different, but it will go in the same area. |
#5
|
||||
|
||||
Code:
if ($userfield['field16']=='yes') // change this to suit you { $user['usergroupid'] = 12; // change this to suit you. } This looks close but I need to add the user to an "additional" usergroup, not as a primary one. What code would you use to add a user to an additional (secondary) group. (the user may also belong to several other additional groups.) Thanks |
#6
|
|||
|
|||
This is great, I rellay needed this, but there semms to be a problem....It simply doesn't work. Any ideas amykhar?
|
#7
|
|||
|
|||
anyone?
|
#8
|
||||
|
||||
Funny, I searched for the exact subject as I need something like this too.
My variation would be if my exttra profile field is a number from 1 to 6 digits or starts with an M or A or LIFE plus 1-6 digits they are placed in their own usergroup which can be a primary group. |
#9
|
|||
|
|||
bump
|
#10
|
|||
|
|||
"other" ?????
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|