Results 1 to 3 of 3

Thread: Custom User Role Mapping

  1. #1
    epicalex's Avatar
    epicalex is offline Hello World
    Join Date
    May 2009
    Location
    London, Berlin, Paris
    Posts
    41

    Default 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.

  2. #2
    Ryan's Avatar
    Ryan is offline WordPress Legend
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,801

  3. #3
    epicalex's Avatar
    epicalex is offline Hello World
    Join Date
    May 2009
    Location
    London, Berlin, Paris
    Posts
    41

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •