Auto Actions - has something changed? Not firing any more

7 years 3 months ago - 7 years 3 months ago #290472 by krileon
With onCPayUserStateChange the User parameter should be set to Automatic and Access set to Everybody. Please ensure this is the case. Are you trying to Add, Replace, or Remove usergroups? You said only some of them are failing. Is there anything about the ones that are failing that is similar to one another? You can revert the API usage with the below change to see if that solves it.

IN: components/com_comprofiler/plugin/user/plug_cbautoactions/models/usergroup.php
ON: Line 38
FROM:
		$myGroups									=	Application::User( $user->get( 'id', 0, GetterInterface::INT ) )->getAuthorisedGroups( false );
TO:
		$myGroups									=	$user->get( 'gids', array(), GetterInterface::RAW );

If that doesn't fix it it's not the API doing it and you'll need to use the debug mode as suggested earlier to try and see where it's failing.

I have left the Reload User on. Would I need to switch it off again?

Shouldn't matter.


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 3 months ago #290473 by poml
No, my problem was also: I did not see any real systematic issue...
I am doing both add and remove, not replace.
It seems that some actions fire, but I cannot figure out why.

Please Log in to join the conversation.

7 years 3 months ago #290474 by poml
This latter change you proposed seems to have fixed it. I'll undo the reload user and check.

Please Log in to join the conversation.

7 years 3 months ago #290475 by poml
It seems to work also when I set the Reload User to Off.

Please Log in to join the conversation.

7 years 3 months ago - 7 years 3 months ago #290481 by krileon
Strange, doesn't make sense why the API can't grab the users current usergroups. That should only affect replace or remove anyway. Adding new groups shouldn't care. Is removing of usergroups the usages that were breaking? Will update the action to first try gids and if that fails then try with API. That should solve this issue for you and the other issue for another 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.

7 years 3 months ago #290485 by poml
Mainly it is not adding usergroups. I think I have also seen it not removing usergroups, but it definitely does not add usergroups.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.658 seconds

Facebook Twitter LinkedIn