CB Auto Action only working in Back-end

2 years 8 months ago - 2 years 8 months ago #325889 by autobahn
CB Auto Action only working in Back-end was created by autobahn
Our usergroup structure is like this:
Public
| Registered
|| Full Members
|| Restricted Members

Whenever the Restricted Access field (which is a dropdown with values or Yes and No) is changed on the members profile (from the frontend or the backend) I want to use an auto-action to remove the member from the Full Members group and add them to the Restricted Members group.

Type: Usergroup
Trigger: onAfterUserUserUpdate
User: Automatic
Access: Everybody
Condition:[cb_restricted_access] Equal To Yes
Mode: Add Usergroups
Groups: Restricted Members
And
Mode: Remove Usergroups
Groups: Full Members

I have a second auto-action which does the same thing in reverse when cb_restricted_access is No.

However, they only work if the Restricted Access field is changed in the back-end.

What trigger(s) should I be using to make them work from the front-end as well?

:) I think I've worked it out. I need to use two triggers - onAfterUserUserUpdate (backed) and onAfterUserUpdateUser (frontend).

Thank you.

Please Log in to join the conversation.

2 years 8 months ago #325898 by krileon
Replied by krileon on topic CB Auto Action only working in Back-end

Trigger: onAfterUserUserUpdate

That trigger doesn't exist. I assume you meant onAfterUserUpdate?

onAfterUserUpdate = frontend user update
onAfterUpdateUser = backend user update


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.

2 years 8 months ago #325900 by autobahn
Replied by autobahn on topic CB Auto Action only working in Back-end
Sorry, yes

onAfterUserUpdate = frontend user update
onAfterUpdateUser = backend user update

I've been looking at this for too long to still be coherent :dry: and didn't want to waste your time when I had the answer

Please Log in to join the conversation.

2 years 8 months ago #325901 by krileon
Replied by krileon on topic CB Auto Action only working in Back-end

I've been looking at this for too long to still be coherent :dry: and didn't want to waste your time when I had the answer

I'm here to help :) a big part of your subscription is the dedicated support so please do not hesitate to ask if you need to know what trigger could be best for a certain action for example.

Once CB Auto Actions becomes a standalone plugin with CB 3.x and we can design our backends more elegantly using Twig with better custom JS I'll be working to make it even easier to use and hopefully have full descriptions for each trigger.


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: autobahn

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.232 seconds

Facebook Twitter LinkedIn