This question already has an answer here:

I am setting up a closed network based on WP. All users are added by an administrator and are given an username and password. I have also added some user fields with the add_action('user_new_form' hook. Besides saving the user data as user metadata, the data is also stored in a custom db table.

I like to built an "resend password" option for the administrator. I don't want to sent a reset password as the administrator is the one who can reset a password if necessary. Can this be done? Or should i store the password also as plain text in the custom db table and use it in an email?


marked as duplicate by kaiser Sep 24 '14 at 11:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • I don't think you can do resend password with WordPress since password are not stored in database in plain text format. Password can only be reset. But I could be wrong. – Robert hue Sep 24 '14 at 8:45
  • The password is stored in the form of MD5 hash encrytion. But you cannot decrypt this password from hash. So it is better to reset the password rather than resending the password. – WisdmLabs Sep 24 '14 at 8:53
  • 1
    Maybe this can help you? – birgire Sep 24 '14 at 8:54
  • @birgire your answer looks promising going to try it out. Did you make it into a plugin?? – alex Sep 24 '14 at 11:30
  • 1
    @alex no I haven't turned it into a plugin yet, but that's the future plan ;-) – birgire Sep 24 '14 at 11:48

WordPress cannot resend the existing password, because it does not know the existing password.

Passwords are not stored as plain text, they are stored using a one-way hash. They cannot be decrypted and resent. They can be reset to something entirely new, and you can send that, but you can't send what you don't know in advance.

Passwords should not be stored as plain text, for security reasons.

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