-
Custom User Role Mapping
After setting up custom roles in WP using Justin Tadlock's Member's plugin, I was frustrated to see that I couldn't map them to roles in BBP.
I created custom roles in BBP using http://bbpress.org/plugins/topic/role-manager/ and these were available in the dropdown to map to a WP role.
So I opened options-wordpress.php and simply added the WP roles to the $wpRoles array. Going back to the admin screen, these WP roles were then available to be mapped, and on save, wp_roles_map was updated with the correct mapping in the database.
So my question now, how can I set up an array_merge across files, so essentially a plugin can be written to allow custom mapping? Thus enabling us to get rid of the "Only standard WordPress roles are supported" message?
Thanks in advance,
Alex
EDIT: OK, so apparently it's not that easy. On creating a new user with a custom role in WP, the user is shown as inactive in BBP until they login on BBP. Logging in on the WP side doesn't seem to change the role to the correct level, and most of my users will be logging in from WP.
EDIT 2: Using the wordpress.org/extend/plugins/bbpress-integration/ plugin, a user now only has to visit the forum for their role to be updated correctly. Original question about array_merge still stands though.
Last edited by epicalex; 06-29-2010 at 09:13 AM.
-
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules