Page 3 of 4

Re: Add phpBB users to custom WordPress groups/roles

Posted: Fri May 11, 2018 10:21 pm
by axew3
yes seem correct the code you use
The code work fine on default, in any way, so it may depend by something else?
Default group for these users is what need to be in phpBB? How they are added in wp, all subscribers?

Re: Add phpBB users to custom WordPress groups/roles

Posted: Sat May 12, 2018 2:50 am
by mLgz0rn
axew3 wrote: Fri May 11, 2018 10:21 pm yes seem correct the code you use
The code work fine on default, in any way, so it may depend by something else?
Default group for these users is what need to be in phpBB? How they are added in wp, all subscribers?
I apply the different custom groups to users on my site, and set that group as default for them.
In wp they are all subscribers, even after they login when I have set the new default group for them.

Re: Add phpBB users to custom WordPress groups/roles

Posted: Sat May 12, 2018 7:43 am
by axew3
I've just try out the addition in any way, also with the custom group plugin and work fine, i was by the way sure about this, after latest release.
So this is very strange.

Re: Add phpBB users to custom WordPress groups/roles

Posted: Sat May 12, 2018 7:16 pm
by mLgz0rn

Code: Select all

}  elseif ( $phpbb_user_session[0]->group_name == 'Raider' ){
        
	$role = 'raider';
does the $role for wordpress need to be the slug(role id) name or the role name?

Re: Add phpBB users to custom WordPress groups/roles

Posted: Sun May 13, 2018 8:48 am
by axew3
slug(role id)
that is the one you insert when you create the role, and that unfortunately, isn't presented on front end after! SO you can grab it if you've forget, by assigning a role to an user, and check it after, the wp_capabilities value of this user, on wp_usermeta, as suggested on a prev post.
Or you could check where these values are stored for the plugin on db, and see these values in, but i've not check where are stored, i've choose the more simple way above explained: i've assign the role to the user, then i've check it on wp_usermeta -> capabilities column vale, because like you i had forget what i had assing as ID for the custom test WP group.
The ID can't contain spaces for example, nor upper case if not wrong, then
My Custom
can be used as display name
but isn't accepted for the ID that will be maybe
my-custom
And you need to use this, the ROLE ID, not the assigned name.

Re: Add phpBB users to custom WordPress groups/roles

Posted: Mon May 14, 2018 12:14 pm
by mLgz0rn
axew3 wrote: Sun May 13, 2018 8:48 am slug(role id)
that is the one you insert when you create the role, and that unfortunately, isn't presented on front end after! SO you can grab it if you've forget, by assigning a role to an user, and check it after, the wp_capabilities value of this user, on wp_usermeta, as suggested on a prev post.
Or you could check where these values are stored for the plugin on db, and see these values in, but i've not check where are stored, i've choose the more simple way above explained: i've assign the role to the user, then i've check it on wp_usermeta -> capabilities column vale, because like you i had forget what i had assing as ID for the custom test WP group.
The ID can't contain spaces for example, nor upper case if not wrong, then
My Custom
can be used as display name
but isn't accepted for the ID that will be maybe
my-custom
And you need to use this, the ROLE ID, not the assigned name.
I just checked wp_usermeta -> capabilities, and the role id I use is correct.
Weird that it dosnt work :S They don't contain spaces nor upper case