Skip to:
Content
Pages
Categories
Search
Top
Bottom

Being re-directed to your Profile Page after login

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

  • richard1987
    Member

    @richard1987

    Anyone? Please :(


    @mercime
    Keymaster

    @mercime


    Famous
    Participant

    @famous

    I am really trying to understand this one, however, I cannot get it. All logins should redirect to the user profile, because that is why a user uses your site in the first place. They care about their information, not the websites general data. I have seen many posts about this, but why does BuddyPress think it’s not the case that a user should redirect to their info?

    Is there a way to code this, without getting into BuddyPress and later regretting it. I don’t want to use anymore plugins.

    Thanks for any enlightenment on this topic, and any help.

    > but why does BuddyPress think it’s not the case that a user should redirect to their info?

    That’s just the way it works. By default, the BuddyPress front page is not the user’s profile page.

    > Is there a way to code this, without getting into BuddyPress and later regretting it. I don’t want to use anymore plugins.

    You can either edit/create bp-custom.php in the plugins directory or use a plugin that someone has created like bp-profile-as-homepage. If you look at the code for this plugin (one short php file), it is very simple. It taps into a wordpress hook to add a check to see if the user is logged in and if so whether the current page is the front page. If it is, then it redirects to the user’s profile page. That seems to be what you want.


    @mikey3d
    Participant

    @mikey3d

    You should let the user decide what they want to go not other way around.

    /plugins/bp-custom.php

    `//=Redirect to User’s Profile Page after Login
    function rt_login_redirect($redirect_to, $set_for, $user){
    $redirect_to = bp_core_get_user_domain($user->id);
    return $redirect_to;
    }
    add_filter(‘login_redirect’, ‘rt_login_redirect’, 20, 3);`


    Famous
    Participant

    @famous

    Thanks for the answers. @Mikey3D, I used the code as you directed and it worked great.
    You said that I should let the user decide where to go and not the other way around. However, it’s not me that has decided that, rather it is the majority of social sites that directed users to their profile. Although, I must say that what you said is true also; a user should specify where they want to go although I haven’t seen that in practice. Great idea though.

    @laconic you said that’s just the way it works, but shouldn’t we question why it works that way. I hope no one gets me wrong–I really want BuddyPress to work, however someone on the internet commented that there is no successful BuddyPress site. Which may not be true, but it gets you thinking–how many BP sites are actually successful? I would think by now at this stage in the development that there would be quite a few. Does anyone know of any? I found this link to successful BP sites. To those who contribute to BP, thanks I really do appreciate BP.


    valuser
    Participant

    @valuser

    have a look at http://blogs.ubc.ca/

    certainly living proof that bp is an extremely useful platform.


    Famous
    Participant

    @famous

    Really nice site @valuser thanks for sharing.

    @Famous I wasn’t trying to squelch your questioning the way it works but this is a How-To and Troubleshooting thread. So, I thought I would nudge us back to the question at hand. Glad you got things working the way you want. I, too, redirect for the same reason.

    Here is a site with 3,000+ members: http://www.h-mag.com/.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Being re-directed to your Profile Page after login’ is closed to new replies.
Skip to toolbar