0

We are using LoginToboggan. How can I send an email to Administrator when Users change their name?

I looked at Rules, but the only Rule action which seems close is

"After updating an existing user account"

Is there a (simple) way to program a custom action which sees that the Name field has been changed?

TIA

{ "rules_notify_sales_on_username_change" : { "LABEL" : "Notify Sales/Administrator On Username Change", "PLUGIN" : "reaction rule", "OWNER" : "rules", "TAGS" : [ "email" ], "REQUIRES" : [ "rules", "mimemail" ], "ON" : { "user_update" : [] }, "IF" : [ { "user_has_role" : { "account" : [ "account" ], "roles" : { "value" : { "11" : "11", "7" : "7", "2" : "2" } }, "operation" : "OR" } } ], "DO" : [ { "mimemail_to_users_of_role" : { "key" : "userupdate-sales", "roles" : { "value" : { "6" : "6", "3" : "3", "20" : "20" } }, "active" : 1, "from_name" : "User Update", "subject" : "User updated their account information", "body" : "An existing user has updated their account. \r\n[account:name] \r\n[account:mail] ", "plaintext" : "An existing user has updated their account. ", "language_user" : 0, "language" : [ "account:language" ] } } ] } }

1 Answer 1

1

yes in Rules you can achieve it

Step 1 : In Events Event add "After updating an existing user account"

Step 2 : Conditions Elements "Execute custom PHP code "

return [account-unchanged:name] != [account:name]

or add data comparison and add

Data to compare Selected data: account-unchanged:name

Operator : equals

Data value : account:name

Step 3: In action send mail

refer this for same kind of problem with role. but you have is name

How do I create a Rule "When role is removed, send email to the user"?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.