Created
July 28, 2015 13:25
-
-
Save jonasvogel/772c20d18b57ddef987c to your computer and use it in GitHub Desktop.
Redirect users who registered through WSL to different site
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
// Fired after registration of new user though the WSL plugin | |
add_action( 'wsl_hook_process_login_after_wp_insert_user', 'jvo_wsl_after_registration', 10, 3 ); | |
function jvo_wsl_after_registration( $user_id, $provider, $hybridauth_user_profile ) { | |
// Only fired if user registered using the WSL Plugin | |
// Add filter for redirect hook | |
add_filter( 'wsl_hook_process_login_alter_redirect_to', 'jvo_wsl_redirect_to', 10, 1 ); | |
} | |
function jvo_wsl_redirect_to( $redirect_to ) { | |
// Change redirect url here | |
return $redirect_to; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment