* The Third Party integration with User Switching.
* @subpackage LiteSpeed_Cache\Thirdparty
namespace LiteSpeed\Thirdparty;
defined('WPINC') || exit();
* Provides compatibility for the User Switching plugin.
* Detects if User Switching is active and registers required nonces.
public static function detect() {
if (!class_exists('user_switching')) {
* Register switch back URL nonce.
if (function_exists('current_user_switched')) {
$old_user = current_user_switched();
do_action('litespeed_nonce', 'switch_to_olduser_' . $old_user->ID);