2

Does anybody knows how could I get the plain password (via hook) in the moment a user registers and before it is hashed?

Thanks

  • May I ask: Why? – kraftner May 20 '15 at 16:15
  • I need to save it in another external (no wordpress) service. I cannot use wp_check_password there. – Buendiadas May 20 '15 at 16:18
  • 4
    That's not a good idea! Then save the hash and compare it. – Sumit May 20 '15 at 16:58
  • Why it's not? I would hash them my way so I can make my own check...Saving the hash wouldn't be a solution for me as I want the users to log in with the same password, and the hash is one way encoded. – Buendiadas May 20 '15 at 17:47
  • There is no such hook - that would be a huge security flaw. – vancoder May 20 '15 at 19:55
0

I haven't looked into it, but any hook on the page that processes the new user registration will have access to the $_POST data and as such you could get it from there.

I agree with the other comments above, you should be able to use use the WordPress hash and check the password on the other website. Would be more sustainable and less susceptible to alterations in future.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.