{ "rules_cod_create_user_registration" : { "LABEL" : "cod_create_user_registration", "PLUGIN" : "reaction rule", "ACTIVE" : false, "TAGS" : [ "cod" ], "REQUIRES" : [ "rules", "commerce", "registration" ], "ON" : [ "registration_insert" ], "IF" : [ { "AND" : [ { "NOT data_is_empty" : { "data" : [ "registration:anon-mail" ] } }, { "NOT entity_exists" : { "type" : "user", "property" : "mail", "value" : "[registration:anon-mail]" } } ] } ], "DO" : [ { "entity_create" : { "USING" : { "type" : "user", "param_name" : "[registration:field-profile-first] [registration:field-profile-last]", "param_mail" : [ "registration:anon-mail" ] }, "PROVIDE" : { "entity_created" : { "new_user" : "New User" } } } }, { "data_set" : { "data" : [ "new-user:status" ], "value" : "1" } }, { "data_set" : { "data" : [ "new-user:field-profile-first" ], "value" : "[registration:field-profile-first]" } }, { "data_set" : { "data" : [ "new-user:field-profile-last" ], "value" : "[registration:field-profile-last]" } }, { "entity_save" : { "data" : [ "new-user" ], "immediate" : 1 } } ] } }