I managed to fix it by simple adding this line to the wp_password_hash function inside wp-password-bcrypt.php right before the return: do_action('wprus_password', $password);
Could you please update the plugin with the additional line?
Glad you got it working, but no we probably won’t add that since then the bcrypt plugin is being coupled to another 3rd party plugin which isn’t a good practice.
It might be useful for wp-password-bcrypt to have its own actions though that people could hook into for additional behaviour like this. Feel free to open a pull request on our repo if that would help with your use case.
Okay, thanks for letting me know. I’m trying but am not (yet) that firm with the WordPress hooks.
So basically I would do something like this?
In my fork of wp-password-bcrypt define a new hook inside the function I want to hook into. So I’d add this at the beginning of the function: do_action('wp_before_set_password', $password, $user_id); (so one can get the password and user_id before the password is set)
In my plugin wait for the hook to be called with something like: add_action('wp_before_set_password', 'myCallback', 10); function myCallback( $pw ) { /* do something with the $pw */ }