Looking for password change event?

Events happening in the community are now at Drupal community events on www.drupal.org.
philosurfer's picture

I am looking to find a way to trigger an event on a password change (email in this case).

I cannot find anything in rules, or even a hook for that matter that lets me know the password has been changed.

I am sure this has been done before, but I am yet to find any discussions on the topic.

Google failed me?!

Comments

Would this point in you in

tr33m4n's picture

Would this point in you in the right direction at all?

http://drupal.org/node/705402

All I see in the hook

philosurfer's picture

All I see in the hook HOOK_user() is the after_update operator but that will give me a TRUE when they update any other field in their profile. I am more or less just concerned with a password update.

Thank you for this link :)


          "we are the cult of personality."

As in perhaps swapping out a

tr33m4n's picture

As in perhaps swapping out a couple of the conditions for others

Not an event, a condition

mitchell's picture

You need to add a property for 'password' to the user entity in Entity API. Then, you can do:
Event: when the user profile is udated
Condition: text_comparison { before:password TO after:password }

This could then be committed through http://drupal.org/node/1216328
I actually made this but never uploaded the patch for it and don't have the code anymore. ..Well, at least I can tell you it will work.

> don't have the code anymore

mitchell's picture

Cool! I found it and uploaded it to Add a property for user's password. Please test. ;)

Rules

Group organizers

Group categories

Categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week