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.
- You must be logged in to reply to this topic.