![]() |
Thanks.Nice Mod.
|
Anyone worked out how to do it for multiple groups?
I would also like to do it for changes on the profile edit page as well, not just upon registration. |
any way this can be modified to allow users to join a social group?:erm:
|
Quote:
- I have a custom made script from a year ago. This is great for me when upgrading to 3.8.x series. |
This mod seemed at first glance to do exactly what we wanted, then we realised that it was bypassing the registered users group, and making it the primary group they joined.
We then read further and saw coffees mod of the mod which bypassed adding them to the primary user group but for us it didnt add them into the secondary user group either, although this option was given to join. any ideas? ideally we would like for users requests to join to be submitted to the group leaders rather than being directly injected into the chosen group, has anyone made this work yet? |
All I did was that I wrote here from before ..
But also forced new registrations to select one group; in my case: Male OR Female. |
I needed (as everybody of course) the user choice to be put in a secondary group, which is the field "membergroupids".
the usergroupid is a one value field and it's meant to have usergroup id's from 1 to 9 (standard users, admin, moderators, registered etc..) which is "2" as default registration. I modified the "if not email" script to write "2" in usergroupid and the user choice in the membergroupids. that might work fine.. the problem is when you are using email verification.. (of course, everybody does). the user is temporarily registered in a "useractivation" table and the userchoice goes into the usergroupid of the useractivation table. when the activation is completed from the email link the membergroupids "hack" is lost again. so if you want to modify it as you did for the if-not-email script you can't! I am a fan of this plugin, I currently have it installed, but I would recommend some vBulletin official user to clarify what should be done and what should not by plugins like this. I'm afraid I'll have to uninstall it before launching my board, I don't want to have to manually modify the usergroup memberships of every user once it's up and running. cheers mates |
ok I think I sorted out the scripts and now I have this plugin adding the usergroup choice on the memberships (secondary usergroup) instead of the primary usergroup (that is defaulted to "2")
change the part of the ifnotemail script to: Code:
$userdata->set('usergroupid', 2); and then add a plugin into the same product with hook location: "register_addmember_process" and paste inside this: Code:
if($vbulletin->options['verifyemail']){ and in the end change the ifemail script, the SQL query has to become like this: Code:
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "useractivation SET usergroupid = 2 WHERE activationid = '".$activateid."' LIMIT 1 "); I'm actually using it for another pourpose but the principle is the same.. I'll keep an eye on this thread for any questions. Cheers |
Good job, it works!
|
thanks !
|
All times are GMT. The time now is 08:07 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|