prosites username needs assigned to site

Hi, I have a thread on my issues but it all rather confusing so I’m going to make a post of where I am and start this fresh.

I have granted access to my site as requested.

My site is http://3dartistnetwork.com/
I use subsites
I use prosites

1) From day 1 of my first user sign up, all the user name only (not pro-site members) have been assigned to the network admin instead of my main site. **The only reason there are any users listed in the main site users is because I assigned them to the main site using when testing Multisite User Management plugin http://wordpress.org/plugins/multisite-user-management/ which has now been deleted. All new users are back to being assigned to the network admin.

2)When I did use the Multisite User Management plug in, and signed with a username only (different browser and computer so I had no admin access), on the dashboard the username only person could create as many free sites as they want.

Unless there is some way to fix this without a plugins.

A) If I use Multisite User Management plug where you have to set up each new site as it added. I attached a plugin screenshot. If a username only signs up on sites A then logs in one site B will they have one or two dashboards. A dashboard for each site they sign up on?

I hope I explain that well enough
Thank you for your time
Kimberly

Original confusing thread is at https://premium.wpmudev.org/forums/topic/user-cant-access-dashboard-to-join-affiliate-program?replies=8#post-726346

  • Michael Bissett

    Hey @Kimberly, hope you're doing well today! :slight_smile:

    2)When I did use the Multisite User Management plug in, and signed with a username only (different browser and computer so I had no admin access), on the dashboard the username only person could create as many free sites as they want.

    I'm confused on this, in the other thread you had said it was the Join My Multisite plugin that had this sort of behavior.

    One thing I should note though that Pro Sites doesn't limit how many free sites a user can create. If you're wanting to limit users to creating paid sites, then you'll have to enable the Pay to Blog module inside of Pro Sites.

    If you use the Join My Multisite plugin, as my colleague Jack had suggested in the other thread, do you find that users are being added to your site when they register for only a username?

    Please advise,
    Michael

    • Kimberly

      Hi, I sent an email to Jack.

      The Join My Multisite plug did not work correctly when I tested it.

      To start with, no one was being added to any site, only the network admin user list. I sent about four hours last night trying to learn how to fix this problem. I did find Multisite User Management plug to work for users being assigned to sites but what I was not sure of was if a users would get a separate dashboard for each site the username only site up for. A dashboard for the main site and if they then logged into another site on the network, would they get another dashboard. I wanted to figure out how that worked before using Multisite User Management plug as a permanent fix.

      While testing this, I learned that people with users name only could set up as many sites as they wanted without signing up to even had a site. (see attached image) Not people would sign up to be site owners but people who signed up as "just a username, please. Those people could create sites.

      I then send another hour or so going over every setting I could think to look at and couldn't find anything wrong. At least the best of my knowledge.

      I hope that explains it.
      Thanks
      Kimberly

  • Ash

    Hello @Kimberly

    I hope you are well today.

    If any user uses "Just a username" that user would be a member of main site, the user won't be a member of any subsite.

    If you want your users to be able to be member of subsites, then you need to use Join My Multisite plugin and use their shortcdoe to create a page in every subsites.

    Please feel free to suggest if I got anything wrong.

    Cheers
    Ash

  • Ash

    Thanks @Kimberly the video helped a lot.

    Please try the following code:

    add_action( 'admin_menu', 'remove_sites_menus' );
    function remove_sites_menus() {
    	if( ! current_user_can( 'manage_options' )  ){
    		remove_submenu_page( 'index.php', 'my-sites.php' );
    	}
    }
    
    add_action( 'admin_init', 'redirect_user' );
    function redirect_user() {
    	if( ! current_user_can( 'manage_options' )  ){
    		if( curPageURL() == admin_url() . 'my-sites.php' ){
    			wp_redirect( admin_url() );
    		}
    	}
    }

    You can add those codes in your functions.php in the theme, if you think your theme won’t be changed. Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name 'mu-plugins'. If there is no folder in that name, then create a folder, name it 'mu-plugins', create a file inside that, give any name you like and paste the code in there. You don't need to activate that plugin. Mu-plugins means must use plugins, so it will be activated automatically always. If you use mu-plugins then add a php start tag at the beginning of the code.

    Hope it helps :slight_smile: Please feel free to ask more question if you have.

    Cheers
    Ash