Skip to:
Content
Pages
Categories
Search
Top
Bottom

login-redirect – BP Profile as Homepage ( broken? )

Viewing 5 replies - 1 through 5 (of 5 total)
  • @shawnyuan

    Member

    What do you want to do?

    @nit3watch

    Participant

    @shawnyuan ** when user log into your website, user is redirected to his/her profile. ** when user tries to move to homepage, user is redirected to his/her profile. **

    Here’s the BP Profile as Homepage plug-in:

    function bp_profile_homepage()
    {
    global $bp;
    if(is_user_logged_in() && $_SERVER=='/')
    {
    wp_redirect( $bp->loggedin_user->domain );
    }
    }
    function logout_redirection()
    {
    global $bp;
    $redirect = $bp->root_domain;
    wp_logout_url( $redirect );
    }
    add_filter('get_header','bp_profile_homepage',1);
    add_action('wp_logout','logout_redirection');

    @argusz

    Member

    this plugin doesn’t work at all.Who can give useful advice?

    @reion

    Member

    // change
    if(is_user_logged_in() && $_SERVER==’/’)
    // to
    if(is_user_logged_in() && is_front_page())
    // it did work for me

    @nanchante

    Participant

    unreal, thanks a lot.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘login-redirect – BP Profile as Homepage ( broken? )’ is closed to new replies.
Skip to toolbar