Skip to Content Skip to Menu

Ban and or Block user - Auto Action

6 years 4 months ago #304881 by webtechplus
Ban and or Block user - Auto Action was created by webtechplus
Good morning,
We have a site we are managing and we have some Auto Actions created to do the following;
- Move Blocked Users into Blocked User Group => [NOT WORKING]
- Move Banner Users into Banned User Group => [NOT WORKING]
- Change Banned User into 'Email notification status' to No => [WORKING]
- GDPR - Focus users to accept Terms and Conditions on log in => [WORKING]
- GDPR - Focus users to accept Privacy Policy on log in => [WORKING]
- Mark all new accounts as 'I DON'T Want Emails' as required by the GDPR => [WORKING]

Is there a way we can export a auto action so it can be sent for checking?
A quick overview of the two actions that are not working is;
'Move Blocked Users into Blocked User Group'
Triggers - onafteruserBlocking
Published - yes
Type - Usergroup
CMS ACL - banned, blocked, guest, manager, admin, registered, site user
Conditions - value = empty, operator = equal to, value = blank, translate = empty, format = check, prepare = blank
Mode = Replace Usergroup, Group = Blocked Accounts
Output - None
Parameters - Reload User = Yes, Translate = Yes


Thanks for support and feedback
We hope that we can assist you if you need and ask, all the best from the WTP Team

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 4 months ago #304890 by krileon
Replied by krileon on topic Ban and or Block user - Auto Action

Is there a way we can export a auto action so it can be sent for checking?

Nope.

Triggers - onafteruserBlocking

That trigger only fires if you're blocking them from the toggle icon in CB > User Management. If you're editing them and changing their blocked state from the field that trigger does not fire. To more reliably do this I recommend the below.

Global
Triggers: onAfterUpdateUser, onAfterUserBlocking
User: Automatic
Access: Everybody
Conditions
1: [var1_block] Equal To 1

That should work with the toggle icon in CB > User Management as well as being blocked from backend user edit. For bans you'll need 2 auto actions. 1 to act on onAfterUserBan and another to act on onAfterUpdateUser since onAfterUserBan doesn't modify the current user object (to be fixed in CB). Below should work fine.

Global
Triggers: onAfterUpdateUser
User: Automatic
Access: Everybody
Conditions
1: [var1_banned] Equal To 1

Global
Triggers: onAfterUserBan
User: Automatic
Access: Everybody
Conditions
1: [var2] Equal To 1

CMS ACL - banned, blocked, guest, manager, admin, registered, site user

Seams like you should just have that set to Everybody.


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.

Moderators: beatnantkrileon
Powered by Kunena Forum