Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 1 replies (of 1 total)

  • wp_kouhai
    Participant

    @wp_kouhai

    I have found and corrected the issue.

    function buddypress_redirect_if_no_avatar($redirect_url,$request_url,$user) {
    
      $avatar = bp_core_fetch_avatar( array( 'item_id' => $user->ID, 'no_grav' => true, 'html'=>false) );
    
      $pos = strpos($avatar, 'mystery-man');
      if ($pos === false) { return "/";}
      else {
        $redirect_url = bp_core_get_user_domain($user->ID)."/profile/change-avatar/";
        return $redirect_url;
      }
    
    }
    
    add_filter("login_redirect","buddypress_redirect_if_no_avatar",100,3);
Viewing 1 replies (of 1 total)
Skip to toolbar