Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sbrajesh/f8fb244cb45872d166558ecb9e7e7d68 to your computer and use it in GitHub Desktop.
Save sbrajesh/f8fb244cb45872d166558ecb9e7e7d68 to your computer and use it in GitHub Desktop.
Add last_activity time for all non active members on BuddyPress
INSERT INTO wp_bp_activity(user_id, component, type, action, content, primary_link, item_id, date_recorded ) select ID, 'members', 'last_activity', '', '', '', 0, NOW() FROM wp_users WHERE ID NOT IN (SELECT user_id FROM `wp_bp_activity` WHERE type="last_activity" )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment