user-switching.php
public static function authenticate_old_user( WP_User $user ) {
		$cookie = user_switching_get_auth_cookie();
		if ( ! empty( $cookie ) ) {
			if ( self::secure_auth_cookie() ) {
				$scheme = 'secure_auth';
			} else {
				$scheme = 'auth';
			}

			$old_user_id = wp_validate_auth_cookie( end( $cookie ), $scheme );

			if ( $old_user_id ) {
				return ( $user->ID === $old_user_id );
			}
		}
		return false;
	}
public static function authenticate_old_user( WP_User $user ) {
		$cookie = user_switching_get_auth_cookie();
		if ( ! empty( $cookie ) ) {
			if ( self::secure_auth_cookie() ) {
				$scheme = 'secure_auth';
			} else {
				$scheme = 'auth';
			}

			$old_user_id = wp_validate_auth_cookie( end( $cookie ), $scheme );

			if ( $old_user_id ) {
				return ( $user->ID === $old_user_id );
			}
		}
		return false;
	}
public static function authenticate_old_user ( WP_User $ user ) { $ cookie = user_switching_get_auth_cookie ( ) ; if ( ! empty ( $ cookie ) ) { if ( self :: secure_auth_cookie ( ) ) { $ scheme = 'secure_auth' ; } else { $ scheme = 'auth' ; } $ old_user_id = wp_validate_auth_cookie ( end ( $ cookie ) , $ scheme ) ; if ( $ old_user_id ) { return ( $ user -> ID === $ old_user_id ) ; } } return false ; }
Authenticates an old user by verifying the latest entry in the auth cookie.

@param WP_User $user A WP_User object (usually from the logged_in cookie).
@return bool Whether verification with the auth cookie passed.
Authenticates an old user by verifying the latest entry in the auth cookie .