hellocoop / wordpress

A login and registration WordPress plugin for the Hellō service.
4 stars 2 forks source link

Logout should take you back to the page where you started #89

Open mscurtescu opened 1 year ago

mscurtescu commented 1 year ago

Currently clicking "Logout" in any page will take you to the login page. If you click "Logout" while on a publicly accessible page it would be expected to be returned to the exact same page.

This behavior is most likely a WordPress general configuration, not a Hellō plugin specific issue. With that in mind:

  1. Find the WordPress configuration needed for the "return to original page" behavior.
  2. Make sure it works with the Hellō plugin as is.

image

mscurtescu commented 1 year ago

Might not be possible. WordPress is not capturing the current page on the logout menu action.

Somewhat related plugins:

mscurtescu commented 1 year ago

The "Log out" link in the comments section implements the correct redirect back to the same post: image

Example log out link:

http://localhost:8080/wp-login.php?action=logout&redirect_to=http%3A%2F%2Flocalhost%3A8080%2F%3Fp%3D1&_wpnonce=8cbafe133e

the link has the expected redirect_to query parameter.