Get current user password before it is overwritten in user form?
Yes you can. The password only gets hashed when the user entity is saved as part of PasswordItem::preSave().

So you can add a submit handler to the user form, fetch both the old password and the new password (as users are required to enter both usually*) and do what you want with it.

There are discussions about that being insecure, so it is possible that this will change in the future.


There are exceptions to this, for example after using a one time login link, users are allowed to change their password without providing the current one.