Ok, I am sorry, I solved it myself. I was deluded by the fact that the functions seem “overridable” but they are in fact not (anymore?)
Proper way to do this in WP is like this (for those running into the same issue):
add_filter('check_password', 'my_check_password', 9, 4 );
function my_check_password($check, $password, $hash, $user_id = '') {
if($check) return true;
// SMF forum compatible check
$user_info = get_userdata($user_id);
$check = ( $hash == sha1( strtolower( $user_info->user_login ) . $password) );
if ( $check && $user_id ) {
// Rehash using new hash.
wp_set_password($password, $user_id);
$hash = wp_hash_password($password);
return true;
}
return false;
}