I'm trying to accomplish the task -" If the User is added to a specific CiviCRM group manually by admin/'users with permissions to add to group', The added user should be blocked.I'm using Rules module with CiviCRM entities.
Here is my Rules export:
{ "rules_block_unblock_user" : {
"LABEL" : "Block\/unblock user",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "civicrm_entity", "rules", "civicrm" ],
"ON" : { "civicrm_group_edit" : [] },
"IF" : [
{ "civicrm_entity_contact_is_in_group" : {
"civicrm_contact" : [ "site:current-user:civicrm-contact" ],
"group_id" : "2"
}
}
],
"DO" : [ { "user_block" : { "account" : [ "site:current-user" ] } } ]
}
}
I guess I'm not selecting the right data selectors. Any help?