Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 1 replies (of 1 total)

  • Kevin
    Participant

    @wp18nkevin

    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 ) { 	
    	if($activity==''){
                  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 1 replies (of 1 total)
Skip to toolbar