Support » Plugin: Restricted Site Access » Login redirect problem with 6.2.0

  • Resolved antcw

    (@antcw)


    I’ve just upgraded a couple of test sites to 6.2.0. Both have redirects to the WordPress login page. When I try to login, I’m just redirected back to the login page (/wp-login.php?redirect_to=%2F). I am logged in because I can go directly to /wp-admin.

    I reverted to 6.1.0 and all worked as expected again.

    I have also just upgraded to WordPress 4.9.6

    Another site uses IP address and that is fine.

    A great plugin. Thank you

Viewing 12 replies - 1 through 12 (of 12 total)
  • Can report the same issue. The logged-out user redirect happens even when logged in.

    Am able to access the dashboard, but not the front of the site as it just keeps redirecting. Reverting back to 6.1.0 for now.

    I have a similar issue with today’s update to 6.2.0. I can log in, but every link takes me back to the designated page for people not logged in.

    • This reply was modified 1 year, 5 months ago by  jkwcape.
    • This reply was modified 1 year, 5 months ago by  jkwcape.

    Haven’t had a chance to check the details, but I have users reporting similar login problems after today’s upgrade to 6.2.0.

    Previous version can be downloaded from this page. Just deleted the current installation and install like a normal plugin. You may need to reset your settings.

    https://wordpress.org/plugins/restricted-site-access/advanced/

    It seems that the return value of this function was wrong:

    protected static function user_can_access() {
    		/**
    		 * Filters whether the user can access the site before any other checks.
    		 *
    		 * Returning a non-null value will short-circuit the function
    		 * and return that value instead.
    		 *
    		 * @param null|bool $access Whether the user can access the site.
    		 */
    		$access = apply_filters( 'restricted_site_access_user_can_access', null );
    
    		if ( null !== $access ) {
    			return $access;
    		}
    
    		if ( is_user_logged_in() ) {
    			return true;
    		}
    
    		if ( is_multisite() ) {
    			$user_id = get_current_user_id();
    
    			if ( is_super_admin( $user_id ) ) {
    				return true;
    			}
    
    			if ( is_user_member_of_blog( $user_id ) && current_user_can( 'read' ) ) {
    				return true;
    			}
    		}
    
    		return false;
    	}

    Got the same prob, rollback to previous version.

    Same issue here… hopefully it will be updated soon!

    I’m experiencing the same things as well. 🙁

    Ditto, just redirected back to log in.

    Plugin Author Helen Hou-Sandi

    (@helen)

    4.0 and 4.7 Release Lead

    Hi all – I apologize for the bug going uncaught before release. I’m working on identifying the issue now and will work to release a fix very soon.

    Plugin Author Helen Hou-Sandi

    (@helen)

    4.0 and 4.7 Release Lead

    Well, fortunately that was a quick catch 🙂 Version 6.2.1 is out now and should address the issue. Please let me know if it doesn’t, and thanks to all of you for reporting the issue!

    All working now. Thanks for sorting so quickly 🙂

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Login redirect problem with 6.2.0’ is closed to new replies.