[#6401] Auto Action - "Add usergroup" does a "Replace usergroup" instead

7 years 3 months ago - 7 years 2 months ago #289394 by fribse2011
I just wanted to add all users that had a specific field set to a Joomla Group, and to my dismay it instead replaced the existing user groups instead of adding one, I did not use Replace Groups, only Add Groups.

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

Please Log in to join the conversation.

7 years 2 months ago #289407 by krileon
Works perfectly fine in my tests and has always worked fine. There's no reason to believe it'd spontaneously stop working. What trigger are you using? Most likely you're overriding an existing user object as CB Auto Actions does not use references by default as you have to specify what variables are references as it can't possibly know in advance per trigger usage. To avoid that you need to either specify the reference variables or enable reload user. Both are configured under the Parameters tab of your auto action.


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.

7 years 2 months ago #289427 by fribse2011
I have created a very simple rule.
The trigger is users.
The condition is
If cb_rykker EQUAL TO 1
Add usergroup Rykker

I tested it by activating the Users link under the auto action plugging

After that, all the Users that had the cb-field to 1, only had the Rykker as groups.

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

Please Log in to join the conversation.

7 years 2 months ago #289428 by krileon
Was able to confirm your issue for that trigger. For some reason for that trigger the gids array is empty. Unsure why at this time, but have added a bug ticket to investigate further. This issue doesn't seam to affect triggers like after login so I suspect it's a problem with how user objects are built for the internal users trigger.

forge.joomlapolis.com/issues/6401


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

Please Log in to join the conversation.

7 years 2 months ago #289430 by krileon
Ok, have fixed for next build. Should be released later today or early tomorrow. Now uses API to grab the users current usergroups instead of relying on gids variable.


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: nant, fribse2011

Please Log in to join the conversation.

7 years 2 months ago #289432 by fribse2011
Wow, excellent work, I'll test it out tomorrow then

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.274 seconds

Facebook Twitter LinkedIn