Show users in members directory right after account activation

By default in BuddyPress, members won’t show in your Members directory if they don’t log in first.

If you want users to show in your site after they activate their account or if you activated users using a plugin, you have to add this piece of code to your child theme/functions.php

add_action('bp_core_activated_user', 'kleo_add_member_activity');
function kleo_add_member_activity($user_id)
{
add_user_meta( $user_id, 'last_activity', date("Y-m-d H:i:s"));
}

After adding this code, users will appear in your Members directory without the need to log in first.

We are SeventhQueen – a crazy and enthusiastic team with unique ideas that have already charmed many great customers.
0 Comments

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

©2017 SeventhQueen - Creative Premium Wordpress Themes | Website Templates

or

Log in with your credentials

Forgot your details?