WordPress.org

Ready to get started?Download WordPress

Forums

Authenticator
[resolved] Multisite Redirect on every Blog (5 posts)

  1. Patrick Pachner
    Member
    Posted 2 years ago #

    I have a multisite with 2 blogs. One is public one should be protected.

    Everything works except one part - when i enter the URL of the Public Blog the redirect goes to http://www.domain.com/wp-signup.php?new=domain.com

    It is only installed on the protected blog - no caching - only basic multisite...

    Any ideas?

    Thanks
    Patrick

    http://wordpress.org/extend/plugins/authenticator/

  2. Frank
    Member
    Plugin Author

    Posted 2 years ago #

    Current i have tested, with different blogs in Multisite; works.
    One blog is protected via plugin, the plugin is active in this blog; the other blogs are not protected; its possible to see frontend and also to view the login page.
    maybe you have more information

  3. Patrick Pachner
    Member
    Posted 2 years ago #

    Like i said it works.

    But on the blog which is not protected it redirects to the Login Page instead of the Front Page.

    I'll send you PM with the Link if you want.

  4. Frank
    Member
    Plugin Author

    Posted 2 years ago #

    Now i have also tested, if the plugn is not active in a blog of a network, then it is possible to go to the login page, no redirect -- hmm; stupid.

    Please send me this; but current i don't have it a pm.

  5. Frank
    Member
    Plugin Author

    Posted 2 years ago #

    maybe an idea.

    change the last function in the plugin with this code; maybe it helps you.

    public static function redirect() {
    
    		/**
    		 * Checks if a user is logged in or has rights on the blog in multisite,
    		 * if not redirects them to the login page
    		 */
    		$reauth = ! current_user_can( 'read' ) &&
    			function_exists( 'is_multisite' ) &&
    			is_plugin_active( plugin_basename( __FILE__ ) ) &&
    			is_multisite() ? TRUE : FALSE;
    
    		if ( ! is_user_logged_in() || $reauth ) {
    			nocache_headers();
    			wp_redirect(
    				wp_login_url( $_SERVER[ 'REQUEST_URI' ], $reauth ),
    				$status = 302
    			);
    			exit();
    		}
    	}

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic