View Full Version : Custom Usergroup on Registration (via e-mail address).
Paul M
04-08-2006, 10:00 PM
This modification is no longer available or supported.
This is a little custom hack originally written for Aeroguy.
This hack allows you to assign a custom usergroup that any users who match a given list of e-mail addresses (or part addresses) will be put into when they confirm their registration - users who are not matched will be still go into the default group (2).
Obviously you must be using e-mail confirmation of registrations for this to work.
Unzip the xml file and import it into vbulletin via the product manager.
History:
v1.01 : First Release.
v1.02 : Minor changes, no update necessary.
AKapadia
04-09-2006, 04:50 PM
thanx for the hack.. i was looking for something like this..
bashy
04-09-2006, 04:51 PM
Hi...Can i ask what this would actually be used for please?
I mean what was the purpose that prompted the request?
Paul M
04-09-2006, 05:14 PM
I believe they ran a site associated with a college, so they wanted anyone with a college e-mail address to go into a special usergroup.
bashy
04-09-2006, 06:53 PM
Ah....yeah i understand it now, i can see where this would be handy for some forums....
Cheers Paul
COBRAws
04-09-2006, 08:44 PM
Paul, im gonna make a golden statue in your honour :P
Snake
04-10-2006, 06:37 PM
Thank you thank you!
username12
04-10-2006, 09:02 PM
Also seems like a viable alternative to banning free e-mail addresses, which I never understood.
forumthemes
04-10-2006, 11:15 PM
Thank you, actually pretty useful hack
Greebo
05-05-2006, 08:21 PM
Anyone got a good list of free email hosts? Today our forum suddently got hit with a major bogus user assault.
Paul
what about Additional, Secondary usergroups?
Paul M
05-09-2006, 01:28 AM
Anyone got a good list of free email hosts? Today our forum suddently got hit with a major bogus user assault.Not sure what that has to do with this hack ?
Paul M
05-09-2006, 01:30 AM
Paul
what about Additional, Secondary usergroups?This has no effect on secondary groups - this is about what primary group you are assigned to when you confirm your registration.
ok Paul, Thanks
i fount that
$userdata->set('membergroupids', X);
another question
what's difference between registration_activate_process and registration_addember_process hook locations?
Paul M
05-11-2006, 04:20 AM
what's difference between registration_activate_process and registration_addember_process hook locations?Well the names pretty much say it all. The addmember_process is called when a new member is added (i.e. when you first register), while activate_process is when a member validates themselves via e-mail verification.
Neo_obs
07-31-2006, 06:20 PM
how hard would it be to transform this so instead of email it looks at age?
Paul M
07-31-2006, 06:40 PM
It would be a totally new mod.
Neo_obs
07-31-2006, 10:56 PM
ohh ok nevermind sorry
Stingray27
02-02-2007, 07:05 PM
Installed.
AshenTemper
05-07-2012, 04:09 PM
I am using this on 4.1.12 and it works which is awesome. The one problem I am having is with case-sensitive issues. When they register, I put them in a different usergroup which works great except when they case-sensitivity of their email address does not match up. For example, if I am "AshenTemper@gmail.com" under the list but I sign up using "ashentemper@gmail.com" (or vice versa), it sees them as two different email addresses and does not put me in the proper group.
Any way of addressing this issue? And yes, I do realize this mod is no longer being supported... just hoping someone who reads this and is familiar with the mod might have some good info/feedback.
soapd
02-13-2013, 09:49 PM
Just came across this thread. It looks like it does exactly what I need... almost. I'm new to vBulletin - does anyone know how to tweak this so that users get added to additional usergroups instead of moved to a different primary one?
I assume this could be changed by editing this part:
$user['usergroupid'] = $vbulletin->options['creggroup'];
$userdata->set('usergroupid', $user['usergroupid']);
$userdata->set_usertitle(
$user['customtitle'] ? $user['usertitle'] : '',
false,
$display_usergroup,
($user_usergroup['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canusecustomtitle']) ? true : false,
($user_usergroup['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['cancontrolpanel']) ? true : false
);
I'm just not familiar enough with vB yet; I assume it could simply be about using a different key/parameter instead of "usergroupid" in the first couple of lines.
I'd appreciate any help or input!
@AshenTemper / case-sensitive issues...
While a vB newbie, I do know PHP, and you could achieve case-insensitivity by editing the code a tiny bit. Open the XML file in a text editor (e.g. Notepad, not Word) and look at like 30 that contains the following:
if (substr($cruser['email'],strlen($cremail)*-1) == $cremail)
Replace this line with the following:
if (strtolower(substr($cruser['email'],strlen($cremail)*-1)) == strtolower($cremail))
What this will do is turn ANY capital letter into lowercase on both ends before comparing the two - i.e. both the list you've entered in admin and the email the user signed up with will be converted to lowercase for comparison. I haven't tested this, but it should do the trick.
I realize that you asked this question about a year ago, but maybe this will help others down the road.
soapd
02-14-2013, 03:00 PM
Following up on my own question above about adding users to a secondary usergroup instead of moving them to a different primary one:
I found the solution and modified the code of the plugin - it works perfectly. If anyone is interested, let me know and I can upload the modified XML here.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.