commit 56b8b8455ddcf6465313f6213394e18aecda2374 Author: himselfv Date: Wed Mar 20 16:03:46 2013 +0400 Hook to let filters guess user (similar to wsl_get_user_by_meta, but custom) diff --git a/includes/services/wsl.authentication.php b/includes/services/wsl.authentication.php index e91add6..a63cfe4 100644 --- a/includes/services/wsl.authentication.php +++ b/includes/services/wsl.authentication.php @@ -743,6 +743,10 @@ function wsl_process_login_hybridauth_authenticate( $provider, $redirect_to ) $user_id = (int) email_exists( $hybridauth_user_profile->emailVerified ); } + // try to guess (reliably) user profile with filters + // this allows for looking at other stuff (such as associated OpenID) + $user_id = apply_filters('wsl_hook_process_login_reliably_guess_user', $user_id, $provider, $hybridauth_user_profile); + // try to get user by meta if not if( ! $user_id ){ $user_id = (int) wsl_get_user_by_meta( $provider, $hybridauth_user_profile->identifier );