Skip to content

Instantly share code, notes, and snippets.

@IlonaF
Created August 15, 2017 10:27
Show Gist options
  • Save IlonaF/320fbbdad59c3917cdbefa379285fb95 to your computer and use it in GitHub Desktop.
Save IlonaF/320fbbdad59c3917cdbefa379285fb95 to your computer and use it in GitHub Desktop.
Redirect to custom user dashboard after logging in with OneAll WordPress plugin
/* Change redirect URL for OnaAll Social Login */
function if_login_registration_redirect_filter ($url, $user_data){
$student_name = get_the_author_meta( 'user_nicename', $user_data->id );
$redirection_url = get_site_url() . '/author/' . $student_name;
return $redirection_url;
}
add_filter('oa_social_login_filter_registration_redirect_url', 'if_login_registration_redirect_filter', 10, 2);
add_filter('oa_social_login_filter_login_redirect_url', 'if_login_registration_redirect_filter', 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment