But there is something else strange !
IF i say "NO" to "Deactivate phpBB user until WP confirmation" , and i make a New Registration, the user account is still deactivated on phpBB !!
Problem with new registered users
-
- User www
- Posts: 70
- Joined: Fri Nov 11, 2016 3:50 pm
- axew3
- w3all User
- Posts: 2883
- Joined: Fri Jan 22, 2016 5:15 pm
- Location: Italy
- Contact:
Re: Problem with new registered users
So, change the function into class.wp.w3all-phpbb.php:
with this (maybe the setting for user role isn't still ok when it is called?):
OR this
???
Code: Select all
public static function wp_w3all_wp_after_pass_reset( $user ) {
.. . . .
}
Code: Select all
public static function wp_w3all_wp_after_pass_reset( $user ) {
global $w3all_config,$w3all_phpbb_user_deactivated_yn;
$w3db_conn = self::wp_w3all_phpbb_conn_init();
$phpbb_config_file = $w3all_config;
$user_info = get_userdata($user->ID);
$wp_user_role = implode(', ', $user_info->roles);
if ( $w3all_phpbb_user_deactivated_yn == 1 && !empty($wp_user_role) OR $w3all_phpbb_user_deactivated_yn != 1 ){
//$username = self::w3all_phpbb_email_hash($user->user_email);
$phpbb_user_data = self::wp_w3all_get_phpbb_user_info($user->user_email);
if ( $phpbb_user_data[0]->user_type == 1 ) {
$res = $w3db_conn->query("UPDATE ".$phpbb_config_file["table_prefix"]."users SET user_type = '0' WHERE user_email_hash = '".$phpbb_user_data[0]->user_email_hash."'");
}
}
}
Code: Select all
public static function wp_w3all_wp_after_pass_reset( $user ) {
global $w3all_config,$w3all_phpbb_user_deactivated_yn;
$w3db_conn = self::wp_w3all_phpbb_conn_init();
$phpbb_config_file = $w3all_config;
$user_info = get_userdata($user->ID);
$wp_user_role = implode(', ', $user_info->roles);
//if ( $w3all_phpbb_user_deactivated_yn == 1 && !empty($wp_user_role) OR $w3all_phpbb_user_deactivated_yn != 1 ){
//$username = self::w3all_phpbb_email_hash($user->user_email);
$phpbb_user_data = self::wp_w3all_get_phpbb_user_info($user->user_email);
if ( $phpbb_user_data[0]->user_type == 1 ) {
$res = $w3db_conn->query("UPDATE ".$phpbb_config_file["table_prefix"]."users SET user_type = '0' WHERE user_email_hash = '".$phpbb_user_data[0]->user_email_hash."'");
}
// }
}
- axew3
- w3all User
- Posts: 2883
- Joined: Fri Jan 22, 2016 5:15 pm
- Location: Italy
- Contact:
Re: Problem with new registered users
the 1.6.8 has been patched to correct users activation when option is set or not into wp_w3all.
fix also user addition as active if the user is added manually by admin.
the patched file is still
class.wp.w3all-phpbb.php
https://plugins.trac.wordpress.org/expo ... -phpbb.php
Topic at wp.org:
https://wordpress.org/support/topic/1-6 ... -register/
fix also user addition as active if the user is added manually by admin.
the patched file is still
class.wp.w3all-phpbb.php
https://plugins.trac.wordpress.org/expo ... -phpbb.php
Topic at wp.org:
https://wordpress.org/support/topic/1-6 ... -register/
-
- User www
- Posts: 70
- Joined: Fri Nov 11, 2016 3:50 pm
Re: Problem with new registered users
Still have the problem , even after the patch...
-
- User www
- Posts: 70
- Joined: Fri Nov 11, 2016 3:50 pm
Re: Problem with new registered users
Hi,
After some tests,
This code that i added into bp-custom.php was the cause of the problem.
It's a little code for a redirection after user activation, and this doesn't work with w3all... can you do something ?
After some tests,
This code that i added into bp-custom.php was the cause of the problem.
Code: Select all
add_action( 'bp_core_activated_user', 'wpse_70289_activated_user_redirect' );
function wpse_70289_activated_user_redirect() {
$page = 'activation-reussie';//your page slug
bp_core_redirect( site_url( $page ) );
}
- axew3
- w3all User
- Posts: 2883
- Joined: Fri Jan 22, 2016 5:15 pm
- Location: Italy
- Contact:
Re: Problem with new registered users
i've try to look into buddypress hooks, but i've not find out one that pass values of the user. I need to check better buddypress filters/hooks and or code in case.
unfortunately do not pass any user info so it is impossible to hook into.
I need to check what can be available to fire the activation in phpBB with this kind of custom redirect scenario ...
will try as i can to see
Code: Select all
add_action( 'bp_core_activated_user'
I need to check what can be available to fire the activation in phpBB with this kind of custom redirect scenario ...
will try as i can to see