SHARE
TWEET

Drupal Rule Export with CiviCRM Entities

sgluskin Jul 9th, 2015 240 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. { "rules_friends_tag_account_create" : {
  2.     "LABEL" : "Friends Tag Account Create",
  3.     "PLUGIN" : "reaction rule",
  4.     "OWNER" : "rules",
  5.     "TAGS" : [ "CiviCRM", "CiviCRM User" ],
  6.     "REQUIRES" : [ "civicrm", "rules", "og" ],
  7.     "ON" : { "civicrm_entity_tag_create" : [] },
  8.     "IF" : [
  9.       { "NOT civicrm_entity_user_exists" : { "civicrm_contact" : [ "civicrm-entity-tag:entity-id-contact" ] } },
  10.       { "data_is" : {
  11.           "data" : [ "civicrm-entity-tag:entity-table" ],
  12.           "value" : "civicrm_contact"
  13.         }
  14.       },
  15.       { "data_is" : { "data" : [ "civicrm-entity-tag:tag-id" ], "value" : "33" } }
  16.     ],
  17.     "DO" : [
  18.       { "civicrm_entity_action_create_user" : {
  19.           "USING" : {
  20.             "civicrm_contact" : [ "civicrm-entity-tag:entity-id-contact" ],
  21.             "is_active" : "1",
  22.             "notify" : "0",
  23.             "signin" : "0"
  24.           },
  25.           "PROVIDE" : { "civicrm_user" : { "createddrupaluser" : "Created Drupal User" } }
  26.         }
  27.       },
  28.       { "user_add_role" : {
  29.           "account" : [ "createddrupaluser" ],
  30.           "roles" : { "value" : { "6" : "6" } }
  31.         }
  32.       },
  33.       { "entity_fetch" : {
  34.           "USING" : { "type" : "node", "id" : "2706" },
  35.           "PROVIDE" : { "entity_fetched" : { "aleph_network" : "aleph_network" } }
  36.         }
  37.       },
  38.       { "og_group_content_add" : { "entity" : [ "createddrupaluser" ], "group" : [ "aleph-network" ] } }
  39.     ]
  40.   }
  41. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top