james david low

live / work / play / worship

Force User Login Multisite

This is my first WordPress plugin in a while. Its a modification of the Force User Login plugin that extends it in two ways:

1) It works with WordPress multisite, so that you can set on a per site basis if a site requires login to view the content.
2) It allows you to set a minium user level to view content, so for example, only Editors and above can view the content. (This is useful when you have automatic user registration set up or on a multisite where users may have access to multiple sites.)

Get it from WordPress here

If you found any of the software useful, please consider supporting its further developement by donating.
3:17pm / Oct 11th / 11
« My Paper Database Read Replicas »


    Hi James, I am trying out your plugin, but have a problem. I am a noob, so you might have to go easy on me for the solution.
    The problem:
    Well, I have joomla installed on my root site (www.acutance.in), and WP installed on http://www.acutance.in/library.
    When I installed your plugin and refreshed the library page, it takes me to ‘acutance.in/wp-login.php’ and not to a ‘acutance.in/library/wp-login.php’ page.
    I have no clue about PHP and hence would deeply appreciate it if you could tell me what I would need to change/edit to have this go to the right page/directory.

    Thanks, Ravi.

    3:59pm / Oct 12th / 11 Ravi

    Please ignore/delete my previous message. Being the impatient person I am, I tinkered around and got it working. Thanks. :)

    4:05pm / Oct 12th / 11 Ravi

    OK, please forgive me. Like I said I am a noob. Could you please have a look at my site, register and then try logging in?
    After I enter my user name (dummy) and password, it brings me back to the login page instead of taking me to acutance.in/library.

    I would deeply appreciate it if you take time out to help me. Yours is the simplest plugin I have seen so far and would like to continue to use it. I’d really like to avoid getting my snobby friend to help me with this.

    Thanks, Ravi.

    4:28pm / Oct 12th / 11 Ravi

    Have you made sure that your user has at least the level of access that you set in the settings?

    If you’ve locked yourself out of your site, try deleting the plugin over FTP.

    4:36pm / Oct 12th / 11 James Low

    I’m working on use this plugin to allow users to set their own blogs as public or now. It seems to only allow superadmin to change the settings once the plugin is running? A site administrator gets the message “You do not have sufficient permissions to modify unregistered settings for this site”. Any ideas?

    10:48pm / Oct 30th / 11 Charlie Love

    I use the WordPress plugin called Force User Login in combination with WishList Member to keep our membership site private. The thing that I don’t like is that it locks out the RSS feed so you can’t use it with a service like MailChimp for an RSS feed email campaign. Due to the fact that WishList Member creates feeds with tokens I don’t need to worry about protecting my RSS feed. Does your plugin lockout the RSS feed also or just the website? If is does lock out the RSS feed is there a way to bypass this?

    Thank you for your time.

    Wendy Merritt

    1:15am / Nov 3rd / 11 Wendy Merritt

    Just installed your plugin… there is a slight problem with it. Yes when enabled for subsciber level, when a use goes to the site they are redirected to the login page… However if thet click on the ‘register’ link, it takes them into the site and have full access to all content. There needs to be away to set it so the only page they can access when clicking on that link is the registration page.


    9:04pm / Nov 19th / 11 Mark

    Wendy, it does lock out the RSS feed too. A change would have to be made to the code to stop it doing this. I may add an option later.

    9:18pm / Nov 19th / 11 James Low

    Thanks Mark, I’ll try look at this ASAP.

    9:18pm / Nov 19th / 11 James Low

    Hi Mark. I have registrations disabled on all my sites, so I didn’t test this original. However I just did, and it doesn’t seem to do it for me. They get redirected to wp-signup.php and that’s all they can see. If on parts of your template that show up when you see wp-signup.php there is content you want to hide (in the header etc.) maybe you need to change your template?

    If something else is happening for you can you send me an example? Cheers.

    9:35pm / Nov 19th / 11 James Low

    Hi James… Forgot to say I am using buddypress.. and it creates a registration page.. So I guess I can’t use your plugin with buddypress.. As I get redirected to the main site when I click on the register link in the login form.. Then I get access to the entire site without registering :)

    Oh well gotta find another way to do it :(

    10:15pm / Nov 19th / 11 Mark

    as even if I type in xxx.com/wp-signup.php, my browser rediirects to : /wp-login.php?redirect_to=/register/

    you wouldn’t know how I could stop that?… big ask I know :)

    10:37pm / Nov 19th / 11 Mark

    I have activated the Force User Login on my blog site. The users have registered and been granted Subscriber access. When any user attempts to access the blog site they receive an error: 404 Not Found, johnstek.com/wp-login.php?redirect_to=/blog/

    Any suggestions?

    3:14am / Jun 25th / 12 Scott Johnston

    Hi James,
    I really appreciate for your plugin. I set up it on our WordPress website and activate it. Now, I’m confused how to use the plugin. Here is the WordPress site I built: http://www.chinalifealliance.com/wordpress, I will set up bilingual site in the following time. Now, I don’t know how to use your plugin (like: how can I add a top menu. when the people press on the menu, they will go to the login and registration page). Can you give me some direction?

    Thanks– Micah

    5:05pm / Jun 25th / 12 Micah

    Hello, and thanks for that beautiful pluggin.

    Did you notice it was not managing superadmin ? I mean, being superadmin I was not able to get into the protected site if I was not one of the users of that site.

    I did a little correction in one function :

    function force_login_multisite_canview($level = null) {
    global $userdata;
    if (is_super_admin()) {
    return true;
    } elseif ($userdata->user_login) {
    $level = ($level != null ? $level : get_option(‘force_login_multisite_minlevel’,-1));
    if ($userdata->user_level >= $level) {
    return true;
    return false;

    It looks like ok now. I can log as a super admin !
    Thanks again.

    11:58pm / Sep 11th / 12 sebastien

    Not letting me post my comment here?

    3:36pm / Oct 11th / 12 Kyle Johnson

    Ok so apparently I just can’t post the link to my site, which is fine.

    I am hoping there might be a way to tweak the force login multisite, to allow visitors to see my homepage, but then all other areas of the site require registration?

    3:37pm / Oct 11th / 12 Kyle Johnson

    Hi !

    Sorry in advance for my very bad english…
    I used your plugin ‘Force User Login Multisite’ during the website was under construction.
    Now i want to desactivate this plugin and let everybody see the site, but when i desactivate the plugin and return to the website, only a white page appear !

    Please could you tell me how desactivate and remove this plugin without problem ?

    I use the last wordpress version…


    7:21pm / Aug 9th / 13 Fabien

    Hi, Sorry you are having trouble with the plugin. I can suggest a few things:

    • Go the force login settings, and disable it there first, after that deactivate it from the plugins menu
    • Delete the plugin all together via FTP

    4:00am / Aug 10th / 13 James Low