Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

get the user token

6 years 4 months ago #306660 by MarlonFungai
Replied by MarlonFungai on topic get the user token
Hi has there been an update to this? is there a substitution I can use for the session token? I need it to post data in CB Subs URL

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48622
  • Thanks: 8303
  • Karma: 1446
6 years 4 months ago #306689 by krileon
Replied by krileon on topic get the user token
You can not access the encoded Joomla session data from substitutions. At this time there's no usage for that. You'd have to use the Joomla API as explained earlier in this topic.


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.

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

6 years 4 months ago #306696 by MarlonFungai
Replied by MarlonFungai on topic get the user token
Just thinking out the box here but would it be possible to use a code field to store the session token and then use that field for substitution?

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

6 years 4 months ago #306705 by MarlonFungai
Replied by MarlonFungai on topic get the user token
I have managed to get the token and store it using a code field and JHtml::_('form.token'); but now my problem is that I can't get substitution to work on the value of the field in order to insert it in the data being posted by CB Subs URL. My substitutions in the body section of the integration settings look something like this;

Itemid=0
[cb_token]=1
option=com_rbids
id=
task=save
oldid=
has_custom_fields_with_cat=0
cat=[cb_category]
title=[cb_auc_shortdescription]

All the substitutions work except for [cb_token] which stores the value of the form token. How can I get the [cb_token]=1 to resolve to e02fc207d256354fa933a0fb80334479=1 for example?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48622
  • Thanks: 8303
  • Karma: 1446
6 years 4 months ago #306709 by krileon
Replied by krileon on topic get the user token
If you're just wanting their Joomla session id then the below should work fine. Note you'll need to be sure format functions have been enabled under Parameters tab of your auto action.

[cb:parse function="getId" class="JFactory::getSession" /]


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.

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

6 years 4 months ago #306710 by MarlonFungai
Replied by MarlonFungai on topic get the user token
Hi its not an auto action its actually CB Subs Plans integration URL in the body section (see screenshot)
Attachments:

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

Moderators: beatnantkrileon
Powered by Kunena Forum