Understanding how login redirect works

The WPUM login form supports multiple redirect methods. Here's an explanation of how each method works and is triggered.

  1. Query string method: the login form will give priority to the redirect_to query string into the browser url. When the query string is available, the login form will ignore any other method and redirect to the url specified into the query string. The query string obviously accepts an url that must be properly encoded.
  2. Redirect to referrer page: if no query string is used ( see above ) and the user clicked a link, or reached the login page from any other page on your site, the login form will redirect to the previously visited page.
  3. Selected page: if both of the above conditions are not available, and you have selected a page into the admin panel, the form will redirect to the selected page. This is usually triggered when someone goes straight to your login page without having visited any other page on your site.
  4. If a query string, a referrer page and a selected page are not available, the login form will redirect to it's current page.

Disabling the referrer page

In some instances you might not want the referrer page redirect to trigger. If this is the case, you can disable the referrer redirect by enabling the option "always redirect" in Users -> WPUM Settings -> Redirects.