Skip to:

Re: Activating existing users

Tim Nicholson


Ok, here’s where I’m at so far. I found out what BP uses to determine if a WP user is a BP user. There is NOT a separate table for BP users. A WP user is considered a BP user if that user has performed ANY “activity”. The BP Members page displays ONLY users that have done something in BP.

For example, when a new user registers, an activity is created saying that user registered. The standard WP user meta table (wp_usermeta) gets a record added for that User ID called “last_activity” and the meta value is the current date and time. Once a user has a last_activity record, then they are displayed in the BP Member directory. You’ll notice that in the Member directory it shows the total users, which should be your total number of WP users, but it also says “Viewing member 1 to x (of x active members”.

I have verified this by manually adding a record to the user meta table for one of my users that registered before I was running BP. That person now shows in the BP member directory.

Now I also see code in BP that attempts to update (or create if not found) the user’s last_activity meta record every 5 minutes while they are logged in. This is so that BP can show how long ago a particular user was “active” for various pages and widgets. I tested this by logging in as another WP user (non-BP user) and it added the record and now displays that person in the list. It also seems to have added that user’s full name in the BP custom profile field table (wp_bp_xprofile_data).

So without doing ANYTHING, our BP member directory will grow as users log in to our site. This probably isn’t a bad thing because if there are users that registered a long time ago for some reason and don’t plan on ever coming back, why list them in the directory?

However, I may still go ahead and try to figure out the best way to programatically add records for all the WP users. My site is new and since I only have 221 users, I’d like to have them added to BP, if for no other reason than for better testing of the plugin before I roll it out. I currently have BP activated, but have hidden all the menus so user’s don’t really know how to get to any of it. My site is at if you want to check it out. Just go directly to a BP URL, such as I’m jacking around with adding BP support to my highly customized WP theme right now so if the formatting looks whacky, that’s why.

I’ll post an update if I work something out programatically to add all the WP users to the BP member directory.

Skip to toolbar