Skip to Content Skip to Menu

Autoaction login fails with latest build and joomla 5.2

  • activha
  • activha
  • OFFLINE
  • Posts: 2332
  • Thanks: 117
  • Karma: 13
3 weeks 5 days ago - 3 weeks 5 days ago #339413 by activha
Hello
I use an autoaction to automatically log in a user like this

Trigger : none
User : automatic
Access : everybody
Condition : none
Action : 
Mode login
Method username
username : [post_username]
password : [post_password]
Force login : yes
Redirect : none

Output : JSON
return json_encode( [ 
    'success' => 'true', 
    'userid' => (int) '[data1_user_id]',
    'refid' => '[data1_cb_refid]', 
    'firstname' => '[data1_firstname]',
    'token' => '[data1_cb_token_api]' 
] );

Method : PHP
Substitutions  Yes

References : Variable 1

It used to work fine until we upgraded to CB latest build and joomla 5.2.0
Since then the userid is always 0 (double checked with several usernames/password)

Made some tests on Postman but fail to understand why

Did you change something in this kind of autoaction recently ?

EDIT:
I noticed that data2 instead of data1 would now give the correct result 
Is it a wanted change ?
Last edit: 3 weeks 5 days ago by activha.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48512
  • Thanks: 8286
  • Karma: 1444
3 weeks 5 days ago #339417 by krileon
It should be data1 unless you're chaining multiple auto actions together resulting in additional data being set. data1 should be the user object and data2 should be the login message, but again depends on if there's any auto action chaining happening.


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.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48512
  • Thanks: 8286
  • Karma: 1444
3 weeks 5 days ago - 3 weeks 5 days ago #339418 by krileon
Took a look and believe I found the cause. A fix is being worked on for a new build release. Will also review in the future adding key based data so you'd be able to just do [data_loginuser_id] to ensure that's always what is returned.


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: 3 weeks 5 days ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48512
  • Thanks: 8286
  • Karma: 1444
3 weeks 5 days ago #339423 by krileon
Ok, this is now fixed in latest build release. Should properly be back to 1 index.


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.
The following user(s) said Thank You: activha

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

Moderators: beatnantkrileon
Powered by Kunena Forum