Adding Existing User Database to BuddyPress

One of the things I’m learning about BuddyPress is that by default it only wants to add new users to your site through the BuddyPress registration process. Never mind that you might have a bunch of existing users on your blog or need to bulk add users. I spent a good part of yesterday and today figuring out how to activate users so BuddyPress would all them to login to the site.

My situation is that I imported users from another database on our server via mysql. Which is the best and fastest method to do this. Once I have all the new users imported there needs to be a record of that user in the wp_usermeta table. So I bulk edited their user roll in the admin dashboard. Changing their roll from “none” to “subscriber.” (that step might not be¬†necessary¬†for bp to view them as “active.” The key step is in the wp_user table you need to make sure that the user status is 0 instead of 2. Apparently 2 indicates that they are an inactive user. I used a mysql script to update that field in the table.

UPDATE wp_users SET user_status='0' WHERE user_status='2';

I had some help figuring this out on the forums. I was originally looking an Pending Activation plugin to make the change, but unless the user registered through BuddyPress the plugin wouldn’t see inactive users.