• Resolved trejder

    (@trejder)


    I have a blog network (Multisite), with domain mapping plugin installed, and some of my sites are under development, so I want to lock them from not registered users.

    I tested a few plugins designed for this purpose (Private Only, Private WP suite, Private WP, Members Only, Registered Users Only, Absolute Privacy and Wp-Private) and all failed.

    I accessed site, saw login form, filled it in, marked “Remember Me”, logged in and I was redirected to Dashboard (user section) not to site itself. When I re-entered site URL (domain) I again saw login page, though I marked “Remember Me”. There is not way I can access site itself.

    I even wrote my own, as simple as possible, plugin for this:

    function show_guest_notice()
    {
    	if(!is_user_logged_in())
    	{
    		echo('No way, man!');
    		die();
    	}
    }
    
    add_action('get_header', 'show_guest_notice');

    and it also failed.

    It seems that either is_user_logged_in() or string user cookie fails on Multisite with Domain Mapping plugin.

    I saw this post and answer by amontobin (“(…) was a domain mapping cookie issue. Now working fine“), but it only assured me that using Multisite with Domain Mapping is source of these problems, but it brings no solution to it.

    So, can anyone help me or got any idea how to make site bloking (is_user_logged_in()) work on Multisite network with Domain Mapping plugin enabled?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Lock one of WP Network sites for not registered users’ is closed to new replies.