Page 3 of 3

Re: Bad group assignement

Posted: Tue Oct 11, 2016 7:34 am
by Ghostrider
Is there the same type of modification to avoid moderateur on phpbb to be included in editor author on Wp ?
thx

Re: Bad group assignement

Posted: Tue Oct 11, 2016 9:40 am
by axew3
Sorry can you repeat the question that i'm try to understand reading it, but maybe i've not got it

MOderators of phpBB, should not be added into WP as editor or author?

Re: Bad group assignement

Posted: Tue Oct 11, 2016 1:14 pm
by Ghostrider
yes
my request is :
when phpbb moderator first connect on wp site, they must be assigned in Subscriber group not more
The forum organisation is not the same as the website organisation

On my old Phpbb forum i have 4 groups
- founder
- webmaster
- moderators
- subscribe

On my news WP site i want :

- founder >>>>>>> WP Administrator
- webmaster>>>>>> WP Editor
- moderators>>>>>> WP Subscriber
- subscribe >>>>>>> WP Subscriber

It ll be great to have the possibility to adjust this in the plugin seetings

Re: Bad group assignement

Posted: Tue Oct 11, 2016 1:45 pm
by aSpecialguest
To change roles for users added from phpBB into WP in wp_w3all and you want custom configuration about this:
open phpbb_groups table on your phpBB database
Look for Group_Name field, related the group you want refer to.
So change as above explained, use the group name to check against before insert users into wordpress, into:
addons/ext_plugins_fixes.php file (1time)
and 2 times on class.wp.w3all-phpbb.php file

the code to search for on files is:
if ( $phpbb_user[0]->group_name == 'ADMINISTRATORS' ){

$role = 'administrator';

} elseif ( $phpbb_user[0]->group_name == 'GLOBAL_MODERATORS' ){

$role = 'editor';

.....
Just search for string ADMINISTRATORS, to get immediately these three portions of code (1time into ext_plugins_fixes.php and two times into class.wp.w3all-phpbb.php

All this about users permissions, could be coded to be friendly and changed with more easy, maybe in a single dedicated function?

[edited]

Re: Bad group assignement

Posted: Tue Oct 11, 2016 1:52 pm
by axew3
yes of course, this was scheduled (and lost) time ago.
good point.

Re: Bad group assignement

Posted: Mon Nov 28, 2016 1:18 pm
by BorisO
Major thanks for the article post. Awesome. Gatz