Skip to:
Content
Pages
Categories
Search
Top
Bottom

Two questions about the login process

  • Avatar of Life2000
    life2000
    Participant

    @life2000

    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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Avatar of Nicoleantoinette
    nicoleantoinette
    Member

    @nicoleantoinette

    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??

    Avatar of Jan M.
    Jan M.
    Participant

    @jotem

    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.

    Avatar of Arx Poetica
    Arx Poetica
    Participant

    @arxpoetica

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

    Avatar of damainman
    damainman
    Member

    @damainman

    Arx Poetica did you find your answer?

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    @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.

    Avatar of kapil
    kapil
    Participant

    @techkapil

    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???

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

You must be logged in to reply to this topic.