Autoaction limit to frontend and direct calls only

7 months 2 days ago #335227 by activha
Hello

I cannot retrieve how to condition autoaction so that they would apply only to frontend users and direct calls, but not be applied when users are logged in back end

Mind to remind me ;-)

 

Please Log in to join the conversation.

7 months 2 days ago - 7 months 2 days ago #335228 by krileon
Empty the "Triggers" param so it says "None" then set "Allow Direct Access" to "Yes". It's now only used for direct access. There isn't a frontend vs backend for auto actions. They're always executed on the frontend unless they're dependent on a trigger.

There are IF substitutions for determining location if that's what you meant. They are as follows.
[cb:if application_context="frontend"]Frontend Only[/cb:if]
[cb:if application_context="administrator"]Backend Only[/cb:if]

So I guess technically you could have the following condition.

Field: Custom > Value
Custom Value: [cb:if application_context="frontend"]PASS[/cb:if]
Operator: Equal To
Value: PASS


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 to join the conversation.

6 months 3 weeks ago #335307 by activha
I have a follow up question :

If I am a mod in frontend and editing another user profile, will [var1_user_id] be this user's id ?

For instance with the trigger onBeforeDeleteUser and the code $userid = $action->string($user, '[var1_user_id]'), is it the mod's id or the edited user's id ?

Thanks

Please Log in to join the conversation.

6 months 3 weeks ago #335311 by krileon

If I am a mod in frontend and editing another user profile, will [var1_user_id] be this user's id ?

That'll depend entirely on the trigger.

For instance with the trigger onBeforeDeleteUser and the code $userid = $action->string($user, '[var1_user_id]'), is it the mod's id or the edited user's id ?

For onBeforeDeleteUser [var1_user_id] is the user id of the user being deleted. [user_id] would be the user id of the user deleting the user.


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 to join the conversation.

6 months 5 days ago #335551 by activha
Just a quick precision on this one : if there are no triggers in the autoaction, will [var1_user_id] be the user id of the user being edited by a moderator ?

Please Log in to join the conversation.

6 months 5 days ago #335558 by krileon
No, what variables are available is purely dependent on the trigger the ran the auto action. So if there's no triggers then there is no var1.


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.241 seconds

Facebook Twitter LinkedIn