johnbillion / user-switching

WordPress plugin that provides instant switching between user accounts.
https://wordpress.org/plugins/user-switching/
GNU General Public License v2.0
187 stars 49 forks source link

Don't use core's `send_auth_cookies` filter #49

Closed johnbillion closed 4 years ago

johnbillion commented 4 years ago

See #48

Plugins such as Jetpack (version 8.1.1+) can use the send_auth_cookies filter to prevent auth cookies from being sent. This is clearly the intended usage of this filter, but it means the switch back functionality can be broken.

To get around this, let's switch to a custom filter instead of using core's. This filter is only used during tests, so the change should be safe.