Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

url ubstitutions in autoaction

  • carin
  • carin
  • OFFLINE
  • Posts: 417
  • Thanks: 18
  • Karma: 0
7 years 10 months ago #292158 by carin
url ubstitutions in autoaction was created by carin
I am still struggling with substitutions.

1. I need the condition "current url" contains "login" in an auto action. How do I refer the current url?

2. Are the conditions chained via AND or OR? There is no hint when one adds a new condition.

CB 2.0

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48709
  • Thanks: 8319
  • Karma: 1447
7 years 10 months ago #292180 by krileon
Replied by krileon on topic url ubstitutions in autoaction

1. I need the condition "current url" contains "login" in an auto action. How do I refer the current url?

There's no substitution to get the current URL. You can however substitute in GET variables, which are a part of the URL. So if you've &view=login you could condition it as follows.

[get_view] Equal To login

2. Are the conditions chained via AND or OR? There is no hint when one adds a new condition.

Conditions are AND. There is no OR usage at this time for auto action conditions.


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.

  • carin
  • carin
  • OFFLINE
  • Posts: 417
  • Thanks: 18
  • Karma: 0
7 years 9 months ago #292534 by carin
Replied by carin on topic url ubstitutions in autoaction
Thank you. I tried it with that but I could not achieve what I need. I would need a redirect to the homepage after the user successfully logged in via the login module but only when that login happended on view=login, not on other pages.

CB 2.0

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48709
  • Thanks: 8319
  • Karma: 1447
7 years 9 months ago - 7 years 9 months ago #292549 by krileon
Replied by krileon on topic url ubstitutions in autoaction
The authentication API has no idea where they came from unless specified. The login triggers were recently updated with additional variables so you can check what the return URL is now using onAfterLogin trigger for example. Specifically the trigger is as follows.

Code:
$_PLUGINS->trigger( 'onAfterLogin', array( &$row, $loggedIn, $firstLogin, &$messagesToUser, &$alertMessages, &$return ) );

This means [var6] is the return URL if one was sent to the login API. There's also onAfterUserLoginSuccess which is only after a manual successful login (e.g. login module/page).

Code:
$_PLUGINS->trigger( 'onAfterUserLoginSuccess', array( $username, $password, $rememberMe, $secretKey, &$return, &$alertmessages, &$messagesToUser, &$resultError ) );

For that trigger [var5] is the return URL if one was supplied (if missing the authentication API will set it to index.php).


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: 7 years 9 months ago by krileon.

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

Moderators: beatnantkrileon
Powered by Kunena Forum