do one thing
put this code at bottom of the script which i gave you and see if you get any output on top of page
PHP Code:
print_r($userfields);
and as you said that you have extended registration process by one step, which plugin you used for that ?
i would have used
PHP Code:
register_addmember_complete
Code:
PHP Code:
if ($newusergroupid == 2) // or any other condition which you want
{
$_REQUEST['do'] = 'register2'; // Extended Step
}