Group Mods

  • Profile picture of r-a-y
  • Profile picture of @mercime
  • Profile picture of hnla

Support: Installing BuddyPress

Problems with getting it running.

Two questions about the login process (7 posts)

Started 3 years ago by: Life2000

  • Profile picture of Life2000 Life2000 said 3 years ago:

    I have seen this question come up before, but I can’t quite solve the problem at my end with existing answers.

    1) The confirmation email going to the user after signing up comes out as: cyrkabiz@box359.bluehost.com (as you can see I am with bluehost too) and this email address is NOT so pretty! Can I change it to my domain name with a couple of simple steps? Please?

    2) Can I send my users straight to Buddypress Profile page after they long in? I would like to avoid the Wordpress back-end here and only use Buddypress’s interface and pages, because they are much prettier and easier for users to deal with.

    I think once I solve these two things, I will then live happily ever after :)

    Thank you so much;

    Vida

  • Profile picture of Nicoleantoinette Nicoleantoinette said 2 years, 11 months ago:

    I just solved problem number 1 this week (by calling bluehost- they fixed it for me over the phone in under 10 minutes), but am still having your same problem number two!

    Any help??

  • Profile picture of Jan M. Jan M. said 2 years, 11 months ago:

    There’s a small function floating around in the forum that should help you:

    function oci_login_redirect($redirect_to, $set_for, $user){
     	$redirect_to = bp_core_get_userurl($user->id);
     	return $redirect_to;
    }
    add_filter('login_redirect', 'oci_login_redirect', 10, 3);

    Just put that in your mu-plugins/bp-custom.php.
    Credits goes to burtadsit.

  • Profile picture of Arx Poetica Arx Poetica said 1 year, 9 months ago:

    I believe this is an outdated method. Is there a newer technique?

  • Profile picture of damainman damainman said 1 year, 5 months ago:

    Arx Poetica did you find your answer?

  • Profile picture of hnla hnla said 1 year, 5 months ago:

    @damainman this is an oldish thread and unlikely to provoke a response. did you have an issue/problem? If so them post a new topic as it will get a better response, having first searched the site as this particular issue may well have been covered more recently.

  • Profile picture of kapil kapil said 1 year, 5 months ago:

    I got into same situation and found solution based on @jotem ‘s filter
    You can use bp_core_get_userlink($user->id) instead of bp_core_get_userurl($user->id). But its lil bit tricky.
    bp_core_get_userlink ($user_id) function returns anchor tag and echo it on the screen. So the login redirection process is halted .

    Instead of that,
    ——————————————————————————————————
    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);
    ——————————————————————————————————
    bp_core_get_user_domain() function will give the profile url without echoing anything.
    One more important thing is priority in add_filter of login_redirect. Make sure that your function executes @ the last.

    One more tricky situation is many time business logic is such a that the redirection process must be done depending on the type of the user. In that case, you have $user->id in rt_login_redirect(). Once you get the user_id, you can put business logic and modify $redirect_to according to your need!

    P.S. Trying to echo any value in this function will give u output but the redirection process will not complete.
    @Life2000
    @arxpoetica @damainman @hnla Are you looking for same???