Last activity timestamp for BuddyPress
-
[ Moved to the Fixing WordPress sub-forum. ]
Hey guys,
I moved all my users from Ning to WordPress+BuddyPress (yay!), and I need to generate a last activity timestamp for all the users so they show up in my BuddyPress members list. Boone B Gorges (BuddyPress superstar!) provided the following script:
$user_ids = $wpdb->get_col( "SELECT ID FROM {$wpdb->users}"); foreach ( $user_ids as $user_id ) { if ( ! bp_core_get_user_last_activity( $user_id ) ) { bp_core_update_user_last_activity( $user_id ); } }I just need some help “finishing” it. He said I need to declare the $wpdb global. I don’t know PHP, so appreciate if anyone could help. I have a local instance of WordPress to test, so no worries about destroying my main site. 🙂
I’m going to follow the instructions here to run the script: http://exygy.com/run-one-time-wordpress-script/
Thank so much – I’m loving this platform so far!
The topic ‘Last activity timestamp for BuddyPress’ is closed to new replies.