I want to send an e-mail after a user profile is updated but not if they are only resetting their password.
I already have the rule working so that when the user profile is updated it sends the e-mail with all the user details, but rules recognises a password reset as an account update. I don't want an e-mail to be sent if it's only a password reset.
Neither of the below rules work as expected, the first one only fires if both fields are changed, if i change the first field but not the second I get this message in the log file "Unable to evaluate condition data_is." if I only modify the second one then I don't get the e-mail.
{ "rules_account_update_2" : {
"LABEL" : "Account Update 2",
"PLUGIN" : "reaction rule",
"REQUIRES" : [ "rules" ],
"ON" : [ "user_presave" ],
"IF" : [
{ "NOT data_is" : {
"data" : [ "account-unchanged:field-first-name" ],
"value" : "[account:field-first-name]"
}
},
{ "NOT data_is" : {
"data" : [ "account-unchanged:field-last-name" ],
"value" : [ "account:field-last-name" ]
}
}
],
"DO" : [
{ "mail" : {
"to" : "",
"subject" : "",
"message" : "",
"from" : "",
"language" : [ "" ]
}
}
]
}
}
The rule with an OR condition, this just never fires no matter what fields I change.
{ "rules_account_update_2" : {
"LABEL" : "Account Update 2",
"PLUGIN" : "reaction rule",
"REQUIRES" : [ "rules" ],
"ON" : [ "user_presave" ],
"IF" : [
{ "NOT data_is" : {
"data" : [ "account-unchanged:field-first-name" ],
"value" : "[account:field-first-name]"
}
},
{ "OR" : [ ] },
{ "NOT data_is" : {
"data" : [ "account-unchanged:field-last-name" ],
"value" : [ "account:field-last-name" ]
}
}
],
"DO" : [
{ "mail" : {
"to" : "",
"subject" : "",
"message" : "",
"from" : "",
"language" : [ "" ]
}
}
]
}
}