Skip to Content Skip to Menu

get the user token

  • saman2
  • saman2
  • OFFLINE
  • Posts: 405
  • Thanks: 7
  • Karma: -1
7 years 2 months ago #296953 by saman2
get the user token was created by saman2
hi
how to get the joomla token for user? is there any Substitutions for that?
tnx

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
7 years 2 months ago #296979 by krileon
Replied by krileon on topic get the user token
Joomla token? Can you be more specific. You mean their user id?


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.

  • saman2
  • saman2
  • OFFLINE
  • Posts: 405
  • Thanks: 7
  • Karma: -1
7 years 2 months ago #297055 by saman2
Replied by saman2 on topic get the user token
excuse me krileon for delay replying...
i think it's session in joomla...my mean of token something that get from this code :
Code:
$session = JFactory::getSession(); $token = md5 ($session->getId());
i must use this $token in the url and i want use that in the cb redirect auto action plugin when the user login.
This code is in the other module of joomla that i want use that manually in cb.
is it possible?
i can test that if you say me what do i do?
tnx

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
7 years 2 months ago #297072 by krileon
Replied by krileon on topic get the user token
You can access the PHP session with [session_VARIABLE], but Joomla session is not accessible to this usage yet. It'd be better to just use a token based off predictable values. Something like md5( user_id . SECRET_KEY ), which you could easily replicate in CB Auto Actions with Format Functions. You can try using format functions to execute that function though since you're able to call a function of a class with format functions.


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.

  • saman2
  • saman2
  • OFFLINE
  • Posts: 405
  • Thanks: 7
  • Karma: -1
7 years 2 months ago #297089 by saman2
Replied by saman2 on topic get the user token
Tnx kerileon but I must use that token in that module.
Is there any way to use some function of other compnent? Or is it possible include that php file and then I can use that's function?
Tnx

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
7 years 2 months ago #297131 by krileon
Replied by krileon on topic get the user token
You can call functions of classes using a Format Function in CB Auto Actions, but it is of course limited. That might help, but beyond that don't know what to tell you other than code the redirect your self in a Code action.


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.

Moderators: beatnantkrileon
Powered by Kunena Forum