Title: infinite loop
Last modified: August 22, 2016

---

# infinite loop

 *  Resolved [wpericl](https://wordpress.org/support/users/wpericl/)
 * (@wpericl)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/infinite-loop-7/)
 * wp 4.1, default install, default theme.
    force login was working for me, now 
   loops me into the login screen only. This seems to happen when the browser is
   closed without logging out first. I can click on “back to wiki” at the bottom
   of the login page, choose log out and then I can get in. Is this the expected
   behavior? Is there a way for the plugin to kill a logon session when the browser
   is closed?
 * [https://wordpress.org/plugins/wp-force-login/](https://wordpress.org/plugins/wp-force-login/)

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

 *  Thread Starter [wpericl](https://wordpress.org/support/users/wpericl/)
 * (@wpericl)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/infinite-loop-7/#post-5814391)
 * amending my post.
    After some more testing. It doesn’t matter if I log out or
   close the browser I get looped back to the log in screen. The only way to get
   around it is to choose back to wiki and clicking on logout. Then I can log in.
   I know the password is good because if I purposely choose a bad password I get
   a different message saying that either the username or password is bad. I am 
   using AD for auth with the AD Integration module. These are the only two modules
   that I am using.
 *  Plugin Author [Kevin Vess](https://wordpress.org/support/users/kevinvess/)
 * (@kevinvess)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/infinite-loop-7/#post-5814412)
 * If I understand correctly, you installed WordPress 4.1 with its default theme
   and then installed the _Force Login_ plugin; then tested and confirmed it works.
 * You said you only installed/activated one other plugin, the “AD Integration” 
   plugin:
    [https://wordpress.org/plugins/active-directory-integration/](https://wordpress.org/plugins/active-directory-integration/)
 * I assume your issue(s) started after you installed and activated that other plugin?
   If you deactivate and/or uninstall the other plugin, does the _Force Login_ plugin
   work correctly again?
 * I don’t know what you’re referring to when you say “back to wiki,” I assume that
   is something that gets added to the login screen by the other plugin?
 * > I can click on “back to wiki” at the bottom of the login page, choose log out
   > and then I can get in.
 * And, you’re having trouble with what exactly?
 * You started to say it “loops [you] to the login screen only,” which I would assume
   means the site is not recognizing you as being logged-in and thus continues to
   redirect you to the login screen until that condition is met.
 * However, you also asked, “Is there a way for the plugin to kill a logon session…?,”
   which I would assume means you _are_ able to login–but can’t logout?
 * _Force Login_ only checks for logged-in WordPress users and considering you’re
   using another plugin to authenticate a logged-in user with a third-party service
   instead, likely this plugin can’t determine if you’re logged-in or not as a WordPress
   user.
 * **TL;DR**
    I suspect your issue is not with this plugin alone, but instead with
   the combination of this plugin and the other authentication plugin you’re using.
 *  Thread Starter [wpericl](https://wordpress.org/support/users/wpericl/)
 * (@wpericl)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/infinite-loop-7/#post-5814424)
 * Kinda and I have some clarity on the issue now.
    I installed wp 4.1 default everything.
   Then I installed AD Integration and that works fine. I can log in with my domain
   account. I didn’t like the fact that the site was visible at any level so I found
   forced login and installed that. All seemed to be well until a user said they
   couldn’t log in.
 * Here what is happening.
    User logs in. User closes browser instead of logging
   off. User browses to site again and tries to log in, credentials are accepted
   but only the login screen appears. They cannot get past the login screen. If 
   user clicks on “back to Internal Wiki” can be seen here. [https://internalwiki.scinovia.com](https://internalwiki.scinovia.com)
   The get the basic web page with a logout option. If they click on log out, the
   next time they try they can log in fine.
 * So I think the problem is distilled down to the case were a user closes the browser
   instead of logging out.
    I tried disabling AD integration plugin and used a local
   account. The behavior is exactly the same.
 *  Plugin Author [Kevin Vess](https://wordpress.org/support/users/kevinvess/)
 * (@kevinvess)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/infinite-loop-7/#post-5814437)
 * Again, you’re using another plugin to authenticate a logged-in user and this 
   plugin only checks if the visitor is logged-in as a **WordPress user**.
 * _Force Login_ uses the built-in **is_user_logged_in()** WordPress function to
   determine if a visitor is logged-in:
    [http://codex.wordpress.org/Function_Reference/is_user_logged_in](http://codex.wordpress.org/Function_Reference/is_user_logged_in)
 * There seems to be a disconnect between what my plugin considers as “logged-in”
   and what the other plugin does.
 * To solve your issue, you will likely need to alter how my plugin works; so it
   authenticates logged-in users in the same manner as the other plugin or try posting
   on their support forum asking if they offer a solution to requiring all visitors
   to login.
 * (If you do post on the other plugin support forum, I would include a link to 
   this thread for reference)

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

The topic ‘infinite loop’ is closed to new replies.

 * ![](https://ps.w.org/wp-force-login/assets/icon.svg?rev=1904031)
 * [Force Login](https://wordpress.org/plugins/wp-force-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-force-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-force-login/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-force-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-force-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-force-login/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Kevin Vess](https://wordpress.org/support/users/kevinvess/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/infinite-loop-7/#post-5814437)
 * Status: resolved