Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’d be interested to know which plugin you switched to. Hadn’t heard about super cache but would be very interested to try it.

    thx
    Brent

    Hi Geoffrey,

    I’ve had the same problem and found a solution that works for me. Perhaps you can try it. Just to be clear, the problem is this:

    When the landing page setting is set to “Return to same url” and you log out, you’re sent to the login page with the “return_to” URL parameter referencing the logout page, causing a login/logout loop when you do log back in.

    Unfortunately my solution requires an update to the source code, meaning it’ll likely be undone when the plugin is updated. However, it’s a one line change and could simply be bookmarked as an added step.

    FIX:

    1. ftp to the “includes” folder of the plugin:

    wp-content/plugins/jonradio-private-site/includes

    2. edit file public.php

    3. In function jr_ps_after_login_url(), change line 271 from

    if (strpos($_SERVER[‘REQUEST_URI’], ‘resetpass’) !== false) {

    to

    if (strpos($_SERVER[‘REQUEST_URI’], ‘resetpass’) !== false || strpos($_SERVER[‘REQUEST_URI’], ‘logout’) !== false) {

    This will cause the logout to redirect to the homepage first, which, due to the private site setting, will then redirect to the login page. This causes the “return_to” parameter in the URL to reference the home page instead of the logout page.

    Let me know if it worked.

    • This reply was modified 4 years, 6 months ago by bprael2.
Viewing 2 replies - 1 through 2 (of 2 total)