/**
* Filters the authentication redirect scheme.
*
* @since 2.9.0
*
* @param string $scheme Authentication redirect scheme. Default empty.
*/
$scheme =
apply_filters( 'auth_redirect_scheme', ''
);
$user_id =
wp_validate_auth_cookie( '',
$scheme );
if ( $user_id ) { /**
* Fires before the authentication redirect.
*
* @since 2.8.0
*
* @param int $user_id User ID.
*/
do_action( 'auth_redirect',
$user_id );
// If the user wants ssl but the session is not ssl, redirect.