by axew3 » Fri Jun 13, 2025 4:55 pm
Change email, password
AND LOGIN only into WP.
Exact! phpBB without something that can recognize the WP password hash will not work!
You see same hash because it is stored in phpBB by the integration plugin code the same way it is created in WP, when you go to update it in WP.
So users will have to login ONLY in Wordpress when you setup the hash password to be in the WP way.
To be more explicit, something like this code:
Code: Select all
if ( str_starts_with( $hash, '$wp' ) ) {
// Check the password using the current prefixed hash.
$password = stripslashes($password);
$password = htmlspecialchars($password, ENT_COMPAT);
$password_to_verify = base64_encode( hash_hmac( 'sha384', $password, 'wp-sha384', true ) );
$check = password_verify( $password_to_verify, substr( $hash, 3 ) );
}
should be simply added into a phpBB listener hook, so to check the pass against it and then login the user when hashed with the WP way, and a login into phpBB occur.
It really seem a good
phpBB WordPress extension addition, i will add for next version!
ps have you
put the file into the created folder
/srv/jowett.club/public/htdocs/wordpress/wp-content/plugins/
wp-w3all-custom/custom_functions.php
Yes? I assume yes because you say that the login works into WP, and it is not because you leaved in place the first code!
Change email, password [b]AND LOGIN only into WP[/b].
Exact! phpBB without something that can recognize the WP password hash will not work!
You see same hash because it is stored in phpBB by the integration plugin code the same way it is created in WP, when you go to update it in WP.
So users will have to login ONLY in Wordpress when you setup the hash password to be in the WP way.
To be more explicit, something like this code:
[code] if ( str_starts_with( $hash, '$wp' ) ) {
// Check the password using the current prefixed hash.
$password = stripslashes($password);
$password = htmlspecialchars($password, ENT_COMPAT);
$password_to_verify = base64_encode( hash_hmac( 'sha384', $password, 'wp-sha384', true ) );
$check = password_verify( $password_to_verify, substr( $hash, 3 ) );
}[/code]
should be simply added into a phpBB listener hook, so to check the pass against it and then login the user when hashed with the WP way, and a login into phpBB occur.
It really seem a good [b]phpBB WordPress extension[/b] addition, i will add for next version!
ps have you [b]put the file into the created folder[/b]
/srv/jowett.club/public/htdocs/wordpress/wp-content/plugins/[b]wp-w3all-custom[/b]/custom_functions.php
Yes? I assume yes because you say that the login works into WP, and it is not because you leaved in place the first code!