This topic has 2 replies, 2 voices, and was last updated 10 years by Laura.

  • Author
  • #120206
     ictned
    Participant

    I already paste this block of codes to sweetdate-child functions.php. I want to prevent the user to go back to their profile as logged in after they logout.

    /* remove “not recently active” */
    function bpfr_core_get_last_activity( $last_activity_date, $string ) {
    if ( empty( $last_activity_date ) ){
    // we do nothing
    $last_active = ”;
    }else{
    $last_active = sprintf( $string, bp_core_time_since( $last_activity_date ) );
    }
    }
    add_filter( ‘bp_core_get_last_activity’, ‘bpfr_core_get_last_activity’ );

    /* remove whole recently active filter */
    function bpfr_remove_last_activity_filter() {
    remove_filter( ‘bp_core_get_last_activity’, $last_active, $last_activity_date, $string );
    }
    add_filter( ‘bp_core_get_last_activity’, ‘bpfr_remove_last_activity_filter’ );

    but it doesn’t work. Hope you can help me.

    #120207
     ictned
    Participant
    Not marked as solution
    #120865
     Laura
    Moderator
    Not marked as solution
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?