Created
February 25, 2015 14:56
-
-
Save spivurno/9246605f009e4c89dfac to your computer and use it in GitHub Desktop.
Gravity Perks // GP Auto Login // Redirect to New Site on Auto Login
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
/** | |
* Gravity Perks // GP Auto Login // Redirect to New Site on Auto Login | |
*/ | |
add_filter( 'gpal_auto_login_on_redirect_redirect_url', function( $url, $user_id ) { | |
require_once( GFUser::get_base_path() . '/data.php' ); | |
$entry_id = get_user_meta( $user_id, 'entry_id', true ); | |
$site_id = GFUserData::get_site_by_entry_id( $entry_id ); | |
$url = get_site_url( $site_id ); | |
return $url; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment