Redirect after registration is wrong

Hi,
I've setup Social Login for my wordpress&buddypress platform. In the Social Login settings, in the registration area, I've selected "Redirect users to their account dashboard (Default)". I want it to redirect to http://[URL]/members/[USER_NAME]. Somehow it still redirects me to the homepage each time I try to register. I'm doing my tests by registering with my FB account. Could you please help me debug this issue?

Best Answer

  • Fred_PinelFred_PinelMember
    Answer ✓
    Hi,
    BuddyPress clears the Social Login redirect URL (because Dashboard redirects are filtered out, one of their rules).
    One workaround, not the best most likely, is to set it back to your chosen URL using hooks, like (in your theme functions.php file):
    add_filter('oa_social_login_filter_registration_redirect_url', 'fix_redirect', 10, 2); add_filter('oa_social_login_filter_login_redirect_url', 'fix_redirect', 10, 2); function fix_redirect($redirect_to, $user_data) { return get_bloginfo('url') . '/members/'. $user_data->user_login; }
    Regards

Answers

  • Hi,
    So, did you set the redirect URL (social login settings) to the URL you mention, but still did not work?

    Regards
  • In the Social Login settings, in the registration area, I've selected "Redirect users to their account dashboard (Default)"
  • Awesome! Thank you heaps!

Welcome!

Please sign in to your OneAll account to ask a new question or to contribute to the discussions.

Please click on the link below to connect to the forum with your OneAll account.