Skip to content

Instantly share code, notes, and snippets.

/**
* Check if a user has a SHA1 password hash, allows login if password hashes match, then updates password hash to wp format
*
* This is a slight modification of https://gist.github.com/maxrice/3203636
*
* Hooks into check_password filter, mostly copied from md5 upgrade function with pluggable.php/wp_check_password
*
* @param string $check
* @param string $password
* @param string $hash