-
-
Save HyperGlide/4885d7b32ad833e0b1f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "rules_chk_email_add_4_manually_created_inq_by_sales_exist_no" : { | |
"LABEL" : "Check if Email Address for Manually Created Inquiry by Sales Already Has An Account if NO Create Account", | |
"PLUGIN" : "rule", | |
"REQUIRES" : [ "rules", "commerce" ], | |
"IF" : [ | |
{ "NOT entity_exists" : { | |
"type" : "user", | |
"property" : "mail", | |
"value" : "[data:clients_email-value-raw]" | |
} | |
} | |
], | |
"DO" : [ | |
{ "entity_create" : { | |
"USING" : { | |
"type" : "user", | |
"param_name" : "[data:user_name-value-raw]", | |
"param_mail" : "[data:clients_email-value-raw]" | |
}, | |
"PROVIDE" : { "entity_created" : { "account_created" : "Account Created" } } | |
} | |
}, | |
{ "data_set" : { "data" : [ "account_created:field-role" ], "value" : "0" } }, | |
{ "data_set" : { | |
"data" : [ "account_created:roles" ], | |
"value" : { "value" : { "13" : "13" } } | |
} | |
}, | |
{ "data_set" : { "data" : [ "account_created:status" ], "value" : "1" } }, | |
{ "entity_save" : { "data" : [ "account_created" ], "immediate" : 1 } }, | |
{ "drupal_message" : { "message" : "User Account Successfully Created." } } | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment