Well I haven't had time to read through all your thread but here is how I would do it:
PHP Code:
$username = 'blabla';
// Optional... or you can use your function
$userid = fetch_userid_from_username($username); // You will need to copy this function from usergroup.php in order to use it
$userinfo = fetch_userinfo($userid);
$userdata =& datamanager_init('User', $vbulletin, ERRTYPE_ARRAY);
$userdata->set_existing($userinfo);
$userdata->set('email', $email);
$userdata->set('password', $password);
$userdata->save();
Something along those lines.