Skip to:
Content
Pages
Categories
Search
Top
Bottom

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

  • Avatar of nit3watch
    nit3watch
    Participant

    @nit3watch

    Ive been searching high and low but can’t find anything that works..

    After trying different methods I went and did a clean install, ( wp 3.0.1 and bp 1.2.6 ) thinking there was a conflict with another plug-in but still the problem persists ( doesn’t redirect at all? ), also DID try a different user account. Anyone had any luck with this?

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

    @shawnyuan

    What do you want to do?

    Avatar of nit3watch
    nit3watch
    Participant

    @nit3watch

    @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');

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

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

    Avatar of nanchante
    nanchante
    Participant

    @nanchante

    unreal, thanks a lot.

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

You must be logged in to reply to this topic.