The "Trigger" I'm using is "onAfterUserRegistrationMailsSent". So then to apply a "CBuser::getInstance" statement to my AutoAction code-block, I could insert these 4 lines at the bottom of my code to write-back to the registered user record. Do I need to do a store() after each set statement? I've inserted some newlines in the VtInsert statement just for readability.
Code:
include 'butler/include/Butler.php';
$userpass = Vt_Rand_Str(10);
$JBuser_Id = VtInsert( $newuser = '[username]',
$newpass = $userpass,
$newemail = '[email]',
$newfirstname = '[firstname]',
$newlastname = '[lastname]',
$newaddress = '[cb_address]',
$newcity = '[cb_city]',
$newstate = '[cb_state]',
$newcountry = '[cb_country]',
$newzip = '[cb_zipcode]',
$newphone = '[cb_phonenumber]',
$newmobile = '[cb_phonenumber]'
);
$cbUser = CBuser::getUserDataInstance( '[user_id]' );
$cbUser->set( 'cb_jbid', $JBuser_Id );
$cbUser->set( 'cb_jbactive', 'Yes' );
$cbUser->store();