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!

CB Auto Actions

12 years 2 months ago #214456 by edmundcheong
CB Auto Actions was created by edmundcheong
I am configuring some auto actions, and I am using the following parameters:

Type: Field
Triggers: onBeforeUserProfileEditDisplay (Frontend)
User: Automatic
Access: Registered

Conditional: (1) [cb_confirmation] Equal to 0
(2) [cb:userdata field="usertype" user="#me"] Equal to Manager

Field to alter: Viewer Name
Operator: Set (Field = Value)
Value: [cb:userdata field="NAME" user="#me" /]


Everything seems to work okay with conditional (1). It is not working if I add conditional (2).

What I am trying to do is to execute the Auto Action when the viewer who perform the trigger (onBeforeUserProfileEditDisplay) is from the "Manager" group (and not other group). Is my condition correct -

[cb:userdata field="usertype" user="#me"] Equal to Manager


The second problem:

Trigger (onBeforeUserProfileEditDisplay) is also happening at the backend. However I manage to block this with another condition. Why is it triggering eventhough I am selecting front end triggers?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48709
  • Thanks: 8319
  • Karma: 1447
12 years 2 months ago #214492 by krileon
Replied by krileon on topic Re: CB Auto Actions

Everything seems to work okay with conditional (1). It is not working if I add conditional (2).

Usertype is completely gone in J2.5/J3.0 so it'll only work on J1.5 and earlier. Simply use the "Access" parameter (which you've set to Registered) instead of trying to set access based off a conditional.

Why is it triggering eventhough I am selecting front end triggers?

Trigger also now fires in backend too, but I have yet to move it to "Frontend & Backend" section.


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.

12 years 2 months ago #214540 by edmundcheong
Replied by edmundcheong on topic Re: CB Auto Actions

krileon wrote:

Everything seems to work okay with conditional (1). It is not working if I add conditional (2).

Usertype is completely gone in J2.5/J3.0 so it'll only work on J1.5 and earlier. Simply use the "Access" parameter (which you've set to Registered) instead of trying to set access based off a conditional.


I have 2 groups here. The viewer (moderator) who is in a manager group and the other is the registered group.

I have tried your suggestion but the parameters I set earlier could be wrong.

Earlier, i set the "access" parameter to "manager", I thought the auto action did not trigger because the profile being edited is performed on a "registered" profile by a moderator who is in the "manager" group.

Are you saying if I set the "access" parameter to manager,the auto action will still trigger, even though the profile which is being edited is only "registered" profile? Meaning that auto-action triggers based on the viewer/moderator (who is currently log in and have a manager access level) to edit a "registered" profile and not the access level of the profile being edited (which might be on a "registered" profile). Correct me if I am wrong. Hope you understand what I am trying to say.

Why is it triggering eventhough I am selecting front end triggers?

Trigger also now fires in backend too, but I have yet to move it to "Frontend & Backend" section.


Understood. I manage to isolate it with a condition. I thought it was a bug. ;)

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

12 years 2 months ago - 12 years 2 months ago #214561 by edmundcheong
Replied by edmundcheong on topic Re: CB Auto Actions
Please read the post prior to this..

I have just tested. It is what I said earlier. I think the Access parameter is for the profile owner. Meaning it will trigger if the owner of the profile is set as the "access" parameter..

I have tried putting manager in the access parameter.. the auto action did not trigger as the profile being viewed is "registered" and the viewer is "manager".

I need the auto action to trigger if "field="usertype" user="#me" Equal to "Manager". Meaning that the the auto action only trigger if the moderator edits another a "registered" profile..

Thanks in advance Krileon..
Last edit: 12 years 2 months ago by edmundcheong.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48709
  • Thanks: 8319
  • Karma: 1447
12 years 2 months ago - 12 years 2 months ago #214602 by krileon
Replied by krileon on topic Re: CB Auto Actions
Access is based off the user executing the trigger so yes it'll be based off the user being edited (wasn't aware it was a moderator editing someone other then themselves). You'll need to match against gid or gids, as I've said earlier usertype is completely gone so you can't use it. This becomes even more difficult if you're on J2.5 for example and have the user assigned to multiple groups in which case you may want to do the below.

[cb:if user="#me" gids includes "8"]1[/cb:if] Equal To 1

With the above you need to be using CB 1.9 and replace 8 with whatever the ID is of your usergroup.


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

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

12 years 2 months ago #214656 by edmundcheong
Replied by edmundcheong on topic Re: CB Auto Actions
Thanks for the support.

I will be testing this out and inform you of the results.

BTW what is the "1" in [cb:if user="#me" gids includes "8"]1[/cb:if] Equal To 1

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

Moderators: beatnantkrileon
Powered by Kunena Forum