Bypass
-
Hi,
I’m having an issue with Force Login and bypass. Here is my code:
add_filter( 'v_forcelogin_bypass', 'my_forcelogin_bypass', 10, 2 ); function my_forcelogin_bypass( $bypass ) { //Get visited URL without query string // $request_uri = $_SERVER['REQUEST_URI']; $url_path = preg_replace('/\?.*/', '', $request_uri); // Allow URL if ( '/lostpassword/' === $url_path ) { $bypass = true; } if ( '/resetpass/' === $url_path ) { $bypass = true; } return $bypass; }
The bypass is working as intended but for some reason when I try to reset my password the force login plugin is redirecting from:
Something like:
https://mysite.com/resetpass/?key=SMUApSYyoWJAHDdcsJlK&login=blah
to
And this is resulting in an invalid key error.
I’ve ensured it’s not caching as these URI’s are removed from the caching system.
I’ve also confirmed this via headers:
x-frame-optionsSAMEORIGIN
x-kinsta-cacheBYPASS
x-redirect-byWordPressI am using theme my login and that’s what is responsible for the non-standard links (/resetpass/ /lostpassword/)
Please let me know if you have any suggestions.
Thanks!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Bypass’ is closed to new replies.