Skip to Content Skip to Menu

Automatically delete a user from GroupJive groups on change in usergroup

  • LineMine
  • LineMine
  • OFFLINE
  • Posts: 160
  • Thanks: 22
  • Karma: 6
7 years 2 weeks ago #297936 by LineMine
Hi

You advised a forum user to try using a Redirect and gj_onBeforeGroupJoin to filter users allowed to join GroupJive groups. I am now using this and it works great, so thanks for that, but I'm wondering if there is a way to reverse the process, so that when a user reverts to Registered, say, they will be deleted from all GroupJive groups?

Thanks

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
7 years 2 weeks ago #297949 by krileon
Ensure CB Auto Actions is up to date as the CB GroupJive action can now remove a user from all groups they've joined. You'd need to do that likely after user update and after update user as that's typically when usergroup change is done.


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

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

  • LineMine
  • LineMine
  • OFFLINE
  • Posts: 160
  • Thanks: 22
  • Karma: 6
6 years 11 months ago - 6 years 11 months ago #298923 by LineMine
Hi

My problem with this Auto action solution is this:

Say I have three user groups, call them Top, Middle and Base. Let's say the Base group is simple registered users, no membership upgrade.The other two have increasing levels of access etc. Middle and Top members can remain Groupjive members, but Base members should be removed.

When I use the Auto action on users, I have to choose which user groups it applies to. However, the action is currently "blind" as to which way the user status is changed. So for example, if I set it to apply to Middle members, they are removed either if demoted to Base or promoted to Top, whereas I need it to only apply if they are demoted to Base.

I'm hoping that there is a way around this?

I know that at some point you will be working on GroupJive 4, when you get time. I wonder if it would be possible to include ACL access to groups in the update, as this would hugely simplify this problem. I'm sure lots of CB users would like the ability to filter group access.

Thanks
Last edit: 6 years 11 months ago by LineMine.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 11 months ago #298932 by krileon
Depends on when your usergroup change is made. Your usergroup change should be triggered. Then you do your auto action to remove them from your GJ groups. It shouldn't have any issues handling this situation. You may have a user object caching problem if you're doing the usergroup change and the removal of GJ groups on the same trigger, which you can resolve by enabling Reload User under the Parameters tab of your removal of GJ groups so the access check can be against the newly updated user object.

I know that at some point you will be working on GroupJive 4, when you get time. I wonder if it would be possible to include ACL access to groups in the update, as this would hugely simplify this problem. I'm sure lots of CB users would like the ability to filter group access.

There will likely never be ACL for groups in the foreseeable future. It makes no sense and conflicts directly with a groups type. It also significantly complicates access checks. Group access is based off its type (e.g. public, invite, approval). If you need groups controlled by ACL then I recommend placing the ACL on its category, which is strictly used for categorization and access.


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.

  • LineMine
  • LineMine
  • OFFLINE
  • Posts: 160
  • Thanks: 22
  • Karma: 6
6 years 11 months ago #298941 by LineMine
Hi
Thanks for your help on this. Howver, Im struggling to get this to work for some reason. I've added 3 screen shots to show how I've set this auto action up.
Thanks.
Attachments:

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 11 months ago - 6 years 11 months ago #298942 by krileon
You need to set Access to the usergroup they're being demoted to. You currently just have it set to affect all Registered users. How are you adding/removing usergroups? If you're using an auto action to add/remove usergroups then ensure it's ordered before your GJ 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.
Last edit: 6 years 11 months ago by krileon.

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

Moderators: beatnantkrileon
Powered by Kunena Forum