• Hi.

    I’ve tested out the function provided in: http://docs.oneall.com/plugins/guide/social-login-wordpress/#4 shown below.

    It doesn’t work. Can someone take a look?

    //Customizes the page to redirect users to after having connected with Social Login
    function oa_social_login_set_redirect_url ($url, $user_data)
    {
    // $user_data is an object that represents the current user
    // The format is similar to the data returned by $user_data = get_userdata ($userid);
    // https://codex.wordpress.org/Function_Reference/get_userdata

    // Redirects users to http(s)://www.your-wordpress-blog.com/members/%user_login%
    return get_site_url(null, ‘/members/’ . $user_data->user_login);
    }

    // Applies the redirection filter to users that register using Social Login
    add_filter(‘oa_social_login_filter_registration_redirect_url’, ‘oa_social_login_set_redirect_url’, 10, 2);

    // Applies the redirection filter to users that login using Social Login
    add_filter(‘oa_social_login_filter_login_redirect_url’, ‘oa_social_login_set_redirect_url’, 10, 2);

The topic ‘Custom Reditrect doesn’t work’ is closed to new replies.