How do you know the substitutions are not working? There's no redirect after onAfterUserRegistration so it can output code. Do a return of $url then set Return to echo. Now do a test registration and you should see your URL echoed on the page to see if it substituted correctly. Seams to be working fine using the below test.
Global
Triggers: onAfterUserRegistration
Type: Code
User: Automatic
Access: Everybody
Action
Code:
Code:
$url=" www.mysite.com/file.php?myref=1234567 ".
"&account_name=". urlencode("[name]").
"&account_email=".urlencode("") . "&account_login=".urlencode("[username]"). "&account_address_street1=".urlencode("[cb_address]"). "&account_address_city=".urlencode("[cb_city]"). "&account_address_country=".urlencode("[cb_country]"). "&account_address_zip=".urlencode("[cb_zipcode]"). "&account_telephone=".urlencode("[cb_phone]"). "&session_id=".$MyREFSessionID;
return $url;
Return: echo
This gave me the below results.
Code:
www.mysite.com/file.php?myref=1234567 &account_name=actiontest2+actiontest2&account_email=&account_login=actiontest2&account_address_street1=%5Bcb_address%5D&account_address_city=%5Bcb_city%5D&account_address_country=%5Bcb_country%5D&account_address_zip=%5Bcb_zipcode%5D&account_telephone=%5Bcb_phone%5D&session_id=
Note, I do not have several of the fields you used but you'll notice account_name is correctly my accounts [name] and account_login is my [username].