Created
August 15, 2017 10:27
-
-
Save IlonaF/320fbbdad59c3917cdbefa379285fb95 to your computer and use it in GitHub Desktop.
Redirect to custom user dashboard after logging in with OneAll WordPress plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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