I like to get the password and email address if a user modify's them.

If a user modify's it's email address or password I like to get that for a different system.
If the user is on the edit account page I like to get the new value but only if he modify's that.
I don't want to get it every time he is on that page.

Any ideas?

I appreciate your help.
Ingo

Comments

cog.rusty’s picture

For email change notification, this module might help

http://drupal.org/project/email_confirm

It is basically for getting confirmation from the user, but I think its setup includes a BCC field to have it forwarded to yourself.

About the user password, you can't have it, it is md5-encoded. Neither the initial one nor the new one.

j_ten_man’s picture

If I understand correctly, you want to do something with the updated e-mail address, correct? If you just want an e-mail then the first reply should work. If you want to send the data to another database or do something else with it, then look in to using hook_user http://api.drupal.org/api/function/hook_user/5. You will specifically want to deal with the 'update' case.

You can check if the value is set in the $edit array and if it is different from the current value (held in $account). If it's different then you can do what you want with it.

ingox’s picture

Thank you very much.
It works fine for me the way you have described.

Ingo