Skip to:

Member “Last Active” shows current time

  • pixieblitz


    Hi everyone…

    I set up a website a few weeks ago and I’m running into something a bit weird with the member stats. When I look at a user’s “Extended Profile” some (but not all) consistently show the last active time as being the current server time (which on a related note I cannot, for the life of me, get to sync with my local time.) I have no idea why this would only be happening for some users. There’s no way they’re consistently on 24/7.

    I’ve also ended up with a few anomalies in the registration process… one user who seems legitimate showed up as having registered the following day (as in the day of their registration I checked and saw their signup as the currentDate +1 ) and was active on the site despite not having verified their e-mail activation. Others are signing up without a “Name”, despite that being a required field. And lastly not all new members seem to be automatically getting assigned the default forum role for bbPress.

    Any help would be appreciated! Thank you so much!

    PS – It’s at running WordPress version 4.5.2 and BuddyPress 2.5.2 on DreamPress with Varnish cache

Viewing 2 replies - 1 through 2 (of 2 total)

  • sharmavishal


    repair buddypress activity via tools and see if that helps…also clear ur varnish cache



    I have the same problem too. The problem is occured in class-bp-members-admin.php

    if ( isset( $user->user_status ) && 2 == $user->user_status ) {
        $last_active = $user->user_registered;
    // Account is activated, getting user's last activity.
    } else {
        $last_active = bp_get_user_last_activity( $user->ID );   //<-- ruturn empty string if not active before.
    $datef = __( 'M j, Y @ G:i', 'buddypress' );
    $date  = date_i18n( $datef, strtotime( $last_active ) );  //<--return current time if $last_active = ''

    I have a fix and put it in functions.php

    function filter_bp_get_user_last_activity( $activity, $user_id ) { 	
                  add_filter( 'date_i18n', function( $j ) { return ' -'; } );
        return $activity; 
    add_filter( 'bp_get_user_last_activity', 'filter_bp_get_user_last_activity', 10, 2 );

    Hope it helps.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar