Convert user passwords to MD5?

It is possible to write code to grab the user’s password on login and write it out in a different format to a different location. Over time, you would thus accumulate the passwords in a different format than WordPress itself uses (it makes use of the excellent PHPass library for password storage).

To do this, you’d most likely use the “check_password” filter, which can receive the boolean result of the password check, the plaintext password, the hashed password (using PHPass), and the user ID number.

However, before doing this, you should probably consider a better approach. Storing passwords in a less secure manner such as MD5 isn’t really advisable. If you need to authenticate in another web application, just use the existing hashes and the PHPass library to do the authentication against them. It’s pretty much as simple as this:

require_once( '/wp-includes/class-phpass.php');
$hasher = new PasswordHash(8, true);
$check = $hasher->CheckPassword($password, $hash);