I have a select box on my webform with approved/not approved and it's not visible to authenticated users.
I have a role set up for : when a webform is updated
with the condition being, if the select box is approved then condition = true.
the action is apply role to user
Now the data selector offers user (User, who submitted the webform)
You would think that this would mean the original user who submitted the form, yet it applies the role to administrator that updates the form.
So rather than the role being applied to [user] it's being applied to [site:current-user].
{ "rules_add_affiliate_role" : {
"LABEL" : "Add Affiliate Role",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"TAGS" : [ "affiliate" ],
"REQUIRES" : [ "webform_rules", "php", "rules" ],
"ON" : { "webform_rules_update" : [] },
"IF" : [
{ "webform_has_id" : {
"form_id" : "webform-client-form-65",
"selected_webform" : { "value" : { "webform-client-form-65" : "webform-client-form-65" } }
}
},
{ "AND" : [
{ "php_eval" : { "code" : "if ($data[\u0027components\u0027][\u0027approval_rule\u0027][\u0027value\u0027][0]==\u0027approved\u0027) {\r\nreturn TRUE;\r\n} else {\r\nreturn FALSE;\r\n}" } }
]
}
],
"DO" : [
{ "user_add_role" : { "account" : [ "user" ], "roles" : { "value" : { "4" : "4" } } } }
]
}
}
Comments
Comment #1
ogursoy commentedExcatly the same error! I confirm this happens.
Comment #2
ogursoy commentedAny updates regarding this bug?
Comment #3
ogursoy commentedNo hope