Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter bcharters

    (@bcharters)

    We ended up putting a redirect in like recommended in the stack overflow article noted above for now. Essentially:

    add_action( ‘login_head’, ‘wpse_redirect_login’, 1 );
    function wpse_redirect_login() {
    if( is_user_logged_in() ) {
    wp_redirect( admin_url() );
    }
    }

    It does this trick… When the plugin redirects the user to the Login screen (we check to see if the user is already logged in and, if so, we bounce them back, but couldn’t there just be a check to see if the user is already authenticated/logged in before sending them to the login screen?

    Thread Starter bcharters

    (@bcharters)

    Does anyone know which php module the “re-drect” to the Logon screen is in this plugin, so we can add in the :

    if( is_user_logged_in() ) {
    LOG THEM OUT //My pseudo code :<) );
    }

    ourselves to fix the issue?

    Any help appreciated.

    Thread Starter bcharters

    (@bcharters)

    Thinking about this, perhaps the simplest would be to check if the user is “Logged in” before re-directing them to the login page and doing:

    if( is_user_logged_in() ) {
    LOG THEM OUT //My pseudo code :<) );
    }

    If you’re going to send them to the login page anyway, because of the “Send anonymous users to login screen” being checked then just log them out so they are in a predictable state for the Login. I’m not a programmer, so I’m not sure why the Plugin thinks they are “anonymous” while WordPress sees them as already logged in, but this only seems to happen when you come to the site for the first time, like entering the URL, so it shouldn’t be a major inconvenience and certainly less inconvenience that the way it is today where we have to tell the users to click on the “back to <website> link.

    I think We’ve observed a related problem and I am using the current version 1.5.15 of Page and Membership Plugin with HTTPS:

    With the Page and Membership Plugin activated and members forced to login, we get the wp-admin screen to login. Enter a valid login and password and press the Login button and you are left on the wp-admin screen rather than being redirected to the Home Page. The workaround has been that we discovered that you can get into the site at the point by clicking on the “back to <website name.” link at the bottom of the wp-admin page as long as you’ve used valid login credentials.

    I’ve validated that it is related to Page and Membership plugin – If I deactivate the plugin and go to the same wp-admin page it works as expected, but, when I reactivate the Page and Membership 1.5.15, the redirection is not occurring after login (at least for HTTPS sites).

    We have observed this on WordPress 4.11, 4.12 and as of today 4.2 and the issue is the same…

    I got the same issue starting today. I’m using today’s latest version 5.4 also.

    I’m also seeing the same error. Can we get copies of the Help files posted somewhere accessible?

Viewing 6 replies - 1 through 6 (of 6 total)