View Full Version : change hack hook from activation to completing registration
ThePiston
06-20-2006, 07:31 PM
I'm using this hack (https://vborg.vbsupport.ru/showthread.php?t=82992) that puts people into a certain usergroup based on a custom registration field. The plugin is called into play when the activation link is used in the confirmation email. I'd rather not have email confirmation. Is there a way to hack the mod so that the plugin works without the email activation?
amykhar
06-20-2006, 07:42 PM
Yes, but it takes some tinkering because of what variables are in scope and what variable names are used at that stage. I chose not to release another version because I just don't have time to support it. But, I am personally using one that works without activation. I'll pm you the code.
ThePiston
06-21-2006, 12:33 AM
thanks for the code... my problem is that I have to use the primary usergroup mod. The activation hook works, but that new hook doesn't work for the mod I'm using:
switch($userinfo['field5'])
{
case "goup1":
$userdata->set('usergroupid', 15);
break;
case "group2":
$userdata->set('usergroupid', 92);
break;
case "group3":
$userdata->set('usergroupid', 17);
break;
}
I'll keep trying other stuff, thanks...:)
amykhar
06-21-2006, 02:27 AM
The hook works, but the variable names were different in that area if I recall correctly. You need to go read register.php around that hook and see what variables they were using. I'm not at home right now and can't access the code.
ThePiston
06-21-2006, 01:01 PM
looks like this is the hook in register.php:
// register IP address
$userdata->set('ipaddress', IPADDRESS);
($hook = vBulletinHook::fetch_hook('register_addmember_proc ess')) ? eval($hook) : false;
$userdata->pre_save();
// check for errors
I added $userdata->set('usergroupid', $user['usergroupid']); under $userdata->set('ipaddress', IPADDRESS); but that didn't work either... i'll keep trying.
actually nevermind - we decided to require email activation - problem solved
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.