Reputation:
I have an option to send an email to an arbitrary email address when a user updates their profile using rules. I want to send those fields which are updated by user.
How can I do this??
I am using the user, user_register_notify, and profileplus modules in Drupal.
Thanks in advance.
Upvotes: 1
Views: 117
Reputation: 436
Steps:
1> You can use a custom submit callback where you can get he updated values in $form_state variable. This can be done in hook_form_alter(defining custom submit callback).
2> Put these variables in $params inside your custom submit callback. Now call a drupal_mail where you pass the $params as an argument.
3> Now define a hook_mail function and handle this mail in the required way.
Hope this helps.
Upvotes: 1