Esempio n. 1
0
function check_bbpress($password, $user)
{
    // WordPress (and so bbPress) used simple md5 hashing some time ago
    if (strlen($user['passwordconvert']) <= 32) {
        return $user['passwordconvert'] == md5($password);
    } else {
        $hash = bbpress_crypt_private($password, $user['passwordconvert']);
        if ($hash[0] == '*') {
            $hash = crypt($password, $user['passwordconvert']);
        }
        return $hash === $user['passwordconvert'];
    }
}
Esempio n. 2
0
 function authenticate_bbpress($password)
 {
     if (bbpress_crypt_private($password, $this->user['passwordconvert'])) {
         return true;
     }
     return false;
 }