Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] collecting CB user info after a new registration through CB action

8 years 2 months ago - 8 years 1 month ago #284939 by smalldragoon

Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /home/joomlapolis824/public_html/libraries/kunena/External/Nbbc/src/BBCode.php on line 1435
Hi,
I splitting another thread
plugin : cbaction
trigger type : onafteruserregistration
user set to autmatic
Type of action : content ( create an article )
I type in a title ..ETc..
for intro text :
user [username] et email :
Last edit: 8 years 1 month ago by krileon. Reason: Added [SOLVED] tag to subject

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48456
  • Thanks: 8280
  • Karma: 1443
8 years 2 months ago - 8 years 2 months ago #284943 by krileon
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].


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 8 years 2 months ago by krileon.
The following user(s) said Thank You: smalldragoon

Please Log in or Create an account to join the conversation.

8 years 1 month ago #285262 by smalldragoon
HI,
found the issue, then reworked through code -> PHP ... all set !
Thanks !
The following user(s) said Thank You: krileon

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum