So with this setup I'm able to assign different roles to my users and can manage their permissions based on those roles. In phpBB we already have a complex permission structure with groups where users can be member in several phpBB groups.
So basically what I try to achieve is to have the feature to managing all permissions in Wordpress by assigning several roles to the users and have that synchronized to phpBB.
Here's an example how the role membership looks in the database in Wordpress when WP-Members stored this.
Code: Select all
mysql> SELECT meta_value FROM wp_usermeta WHERE user_id = '2237' AND meta_key = 'wp_capabilities';
+-------------------------------------------------------------------------------+
| meta_value |
+-------------------------------------------------------------------------------+
| a:3:{s:11:"klubbmedlem";b:1;s:14:"styrelsemedlem";b:1;s:10:"guldmedlem";b:1;} |
+-------------------------------------------------------------------------------+
1 row in set (0.00 sec)
Btw. these strange role names are different member levels in the Swedish language
Code: Select all
[tomas@laptop ~]$ php <<EOF
> <?php print_r(unserialize('a:3:{s:11:"klubbmedlem";b:1;s:14:"styrelsemedlem";b:1;s:10:"guldmedlem";b:1;}')); ?>
> EOF
Array
(
[klubbmedlem] => 1
[styrelsemedlem] => 1
[guldmedlem] => 1
)