Skip to:
Content
Pages
Categories
Search
Top
Bottom

Fixing WordPress-integrated users without membership

  • Here’s a quick tip for anyone running an integrated WP+BB setup…

    Sometimes you’ll find users who haven’t been properly mapped into bbPress roles, so here is a quick MySQL statement to make them all members:

    insert into wp_usermeta (user_id, meta_key, meta_value) select user_id, 'bb_capabilities' as meta_key, 'a:1:{s:6:"member";b:1;}' as meta_value from wp_usermeta where user_id not in (select user_id from wp_usermeta where meta_key = 'bb_capabilities') group by user_id;

    (It adds a bb_capabilities record to the wp_usermeta table for each user who doesn’t have one. Thus, broken accounts become members. Yay!)

    Have fun. :-)

Viewing 1 replies (of 1 total)

  • hotforwords
    Member

    @hotforwords

    jdub, you ROCK!

    I had 44,756 members in my WordPress site and only ~28,000 members in my forums.. so I had 16,287 broken accounts in the forums

    I ran your MYSQL query and in 2.0724 seconds it repaired the 16,287 accounts and now I am golden!!

    Thanks so much!

    Marina

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.