i've check it on fly right now, and all work fine, these steps i've do to resume:
on phpBB i've add another test group, that i've named
another testgroup, and in phpBB db, on groups table, it is stored as
another testgroup
exactly as it is (this is what you need).
I have a test user named
makron in phpBB, and i want it added on a custom group of WordPress. User makron belong to
Pre-defined groups user is a member of
Newly registered users and Registered users
but belong also, as
group default, to the group
another testgroup
under
User defined groups user is a member of
I've create so another test group in wordpress. On creating it, with the plugin you use, i've set:
as
Role ID:
Role ID:
another-testg (this is what you need)
so using this parameters, i've edit class.wp.w3all-phpbb.php in this way, respectively, on
private static function verify_phpbb_credentials(){:
i've change this code:
Code: Select all
if ( $phpbb_user_session[0]->group_name == 'ADMINISTRATORS' ){
$role = 'administrator';
} elseif ( $phpbb_user_session[0]->group_name == 'GLOBAL_MODERATORS' ){
$role = 'editor';
} else { $role = 'subscriber'; } // for all others phpBB Groups default to WP subscriber
with this code:
Code: Select all
if ( $phpbb_user_session[0]->group_name == 'ADMINISTRATORS' ){
$role = 'administrator';
} elseif ( $phpbb_user_session[0]->group_name == 'GLOBAL_MODERATORS' ){
$role = 'editor';
} elseif ( $phpbb_user_session[0]->group_name == 'another testgroup' ){
$role = 'another-testg';
}
else { $role = 'subscriber'; } // for all others phpBB Groups default to WP subscriber
and on
public static function w3_check_phpbb_profile_wpnu($username){
i've change this code:
Code: Select all
if ( $phpbb_user[0]->group_name == 'ADMINISTRATORS' ){
$role = 'administrator';
} elseif ( $phpbb_user[0]->group_name == 'GLOBAL_MODERATORS' ){
$role = 'editor';
} else { $role = 'subscriber'; } // for all others phpBB Groups default to WP subscriber
into this:
Code: Select all
if ( $phpbb_user[0]->group_name == 'ADMINISTRATORS' ){
$role = 'administrator';
} elseif ( $phpbb_user[0]->group_name == 'GLOBAL_MODERATORS' ){
$role = 'editor';
} elseif ( $phpbb_user[0]->group_name == 'another testgroup' ){
$role = 'another-testg';
}
else { $role = 'subscriber'; } // for all others phpBB Groups default to WP subscriber
and the result is ok, the user is correctly added on the needed wordpress custom group. That is.
I'm sorry that you can't get it work as you need! What happen on your side?
i've check it on fly right now, and all work fine, these steps i've do to resume:
on phpBB i've add another test group, that i've named [b][i]another testgroup[/i][/b], and in phpBB db, on groups table, it is stored as [i]another testgroup[/i]
exactly as it is (this is what you need).
I have a test user named [i]makron[/i] in phpBB, and i want it added on a custom group of WordPress. User makron belong to
[i]Pre-defined groups user is a member of[/i]
Newly registered users and Registered users
but belong also, as [b]group default[/b], to the group [b]another testgroup[/b]
under [i]User defined groups user is a member of[/i]
I've create so another test group in wordpress. On creating it, with the plugin you use, i've set:
as [b]Role ID:[/b]
Role ID:
[b]another-testg[/b] (this is what you need)
so using this parameters, i've edit class.wp.w3all-phpbb.php in this way, respectively, on
[b][i]private static function verify_phpbb_credentials(){[/i][/b]:
i've change this code:
[code]if ( $phpbb_user_session[0]->group_name == 'ADMINISTRATORS' ){
$role = 'administrator';
} elseif ( $phpbb_user_session[0]->group_name == 'GLOBAL_MODERATORS' ){
$role = 'editor';
} else { $role = 'subscriber'; } // for all others phpBB Groups default to WP subscriber[/code]
[b]with this code:[/b]
[code]if ( $phpbb_user_session[0]->group_name == 'ADMINISTRATORS' ){
$role = 'administrator';
} elseif ( $phpbb_user_session[0]->group_name == 'GLOBAL_MODERATORS' ){
$role = 'editor';
} elseif ( $phpbb_user_session[0]->group_name == 'another testgroup' ){
$role = 'another-testg';
}
else { $role = 'subscriber'; } // for all others phpBB Groups default to WP subscriber[/code]
and on
[i][b]public static function w3_check_phpbb_profile_wpnu($username){[/b][/i]
[b]i've change this code:[/b]
[code]if ( $phpbb_user[0]->group_name == 'ADMINISTRATORS' ){
$role = 'administrator';
} elseif ( $phpbb_user[0]->group_name == 'GLOBAL_MODERATORS' ){
$role = 'editor';
} else { $role = 'subscriber'; } // for all others phpBB Groups default to WP subscriber[/code]
[b]into this:[/b]
[code]if ( $phpbb_user[0]->group_name == 'ADMINISTRATORS' ){
$role = 'administrator';
} elseif ( $phpbb_user[0]->group_name == 'GLOBAL_MODERATORS' ){
$role = 'editor';
} elseif ( $phpbb_user[0]->group_name == 'another testgroup' ){
$role = 'another-testg';
}
else { $role = 'subscriber'; } // for all others phpBB Groups default to WP subscriber[/code]
and the result is ok, the user is correctly added on the needed wordpress custom group. That is.
I'm sorry that you can't get it work as you need! What happen on your side?