Here you go I have a fix for the issue of this user not having to verify their email first.
Move down your whole code and modify it a bit. The new code should look like
Code:
$vboptions['ipusermoderation'] = trim($vboptions['ipusermoderation']);
if ($vboptions['ipusermoderation'])
{
$addresses=explode('', preg_replace("/[[:space:]]+/", "",$vboptions['ipusermoderation']) );
foreach ($addresses AS $val)
{
if (strpos(' ' . IPADDRESS, ' ' . trim($val))!==false)
{
//thiswill be theusergroupidAFTER the user is verified
$lateractivationid=4;
}
else
{
$lateractivationid=2;
}
}
}
And you want to place it right
before this
Code:
// sort out emails and usergroups
if ($vboptions['verifyemail'])
{
BUT you will have to ALSO change this line:
Code:
$activateid = build_user_activation_id($userid, 2, 0);
TO
Code:
$activateid = build_user_activation_id($userid, $lateractivationid, 0);
and you should be all set. WARNING, untested!