I have a multisite, that when when a person was assigned

I have a multisite, that when when a person was assigned as a super admin, the only received permissions for the root site.

Upon closer inspection, I found there was some abuse in issuing the super admin logins, and 2 of them had regular logins with super logins. Instead of this, the asigning the 1st one is a super admin.

I was up a removed all the superfluous accounts, except one, one that would allow me to delete it? . You So I edited them out them from the tables username, and whatever replaced usermeda.

And I screw it up! Now I can't login at all!

Any ideas of how to proceed?

Thanks
Ron

  • Kingdom Studios

    @rmahon,

    Try and add another user to the database through MySQL in the cPanel. Make sure you attach that user to the database and give them ALL access rights.

    You can use the same instructions as when creating a multisite, you just don't have to recreate another database. https://premium.wpmudev.org/manuals/wpmu-and-buddypress-installation-2/setting-up-mysql-database-and-user/

    Let me know how that works.

    Regards,

    Martin

  • aristath

    Hello there @rmahon, I hope you're well today!

    I have a multisite, that when when a person was assigned as a super admin, the only received permissions for the root site.

    Superadmins can access all sites, they simply don't show up in the "My Sites" menu.
    If however they access Network => Sites they are able to access all sites from there.

    And I screw it up! Now I can't login at all!

    I haven't tested this but it should work...
    Try adding this to yourr theme's functions.php file:

    $user_data = array(
    	'user_login' => 'administrator',          // The username
    	'user_pass'  => 'administrator',          // The password
    	'user_email' => 'administrator@test.com', // The user's email
    	'role'       => 'superadmin'              // The user role
    );
    
    if ( !username_exists( $user_data['user_login'] ) ) {
    	wp_insert_user( $user_data );
    }

    Once you do, reload you site and try logging-in with username "administrator" and password "administrator".

    Let me know if that works!

    Cheers,
    Ari.

  • rmahon

    Thanks all for your help... Sometimes you think better if you get more than 2 hours sleep.

    Ok, I just edited the database using the information in the codex.

    Now, I add a new user, give them super admin permissions by checking on the square in their user file.

    Except the only have it on the root domain, there are 5 subdomains on the site and only the original superuser have access to them. They do not show to the right where it shows you the sub domains.

    I also have the Facebook login plug-in installed, and I wonder if that's compatible with multiuser?

    Does anybody have experience with this? A related question will come up later on, when I want to assign a author to one domain.

    thanks, Ron

  • aristath

    Except the only have it on the root domain, there are 5 subdomains on the site and only the original superuser have access to them. They do not show to the right where it shows you the sub domains.

    Subsites show up only to people that are admins of those sites. So if you have not added any other admins on them they won't show up for users.

    I also have the Facebook login plug-in installed, and I wonder if that's compatible with multiuser?

    Yes, it is.

    Cheers,
    Ari.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.