The MU forums have moved to WordPress.org

Admin management options not showing up after log into main admin account (22 posts)

  1. Cruz
    Member
    Posted 16 years ago #

    Dear all,

    I am facing some strange issue. After logging into the main MU admin account, the admin account acts as it is a regular blog user account. (the ability to manage blog users/blogs.. etc under "Manage" disappears) I removed cache but that does not help. (Actually I've experienced this numerous times before. Usually after I re-try login a few times, this could be solved. But now it is completely breaking.)

    I used Phpmyadmin and found that the user_status for admin appears is 0, which is identical to all other regular users. (Could this be the indication of whether the username is super-admin account? If so what is the right indication for super-admin account?)

  2. andrea_r
    Moderator
    Posted 16 years ago #

    I *think*, haven't checked, but the user status for admin should be 10.
    Weird it does that on ya though.

  3. Cruz
    Member
    Posted 16 years ago #

    After changing status to 10, still not changing the situation. Hum...

  4. Cruz
    Member
    Posted 16 years ago #

    Dear experts,
    I am now even more puzzled as I installed MU on another server and found out that user_status is actually 0, identical to regular users. Then there must be another table that determine the admin status right?

  5. andrea_r
    Moderator
    Posted 16 years ago #

    Whups, got mixed up. In the user_status, yes, they should all be 0, because each one if admin *to their own blogs*
    in user_meta, that's where the capability level is stored. Admins are 10.

    I beleive the site admin isn't set thru a level like this, rather, by the username "admin" and through being connected to the primary blog.

  6. Cruz
    Member
    Posted 16 years ago #

    Thank you Andrea!

  7. drmike
    Member
    Posted 16 years ago #

    Andrea, that wouldn't work since we can have multiple site admins, all with different names.

    Open up your database and view the wp_sitemeta table. You'll find a key in there labeled 'Site Admins.' Gotta admit that I'm not 100% knowledgeable on how it's setup so I'm going to suggest that you just replace the name of an account in there with the name of your admin account and then fix it afterwards when you can login.

    Hope this helps,
    -drmike

  8. Cruz
    Member
    Posted 16 years ago #

    Thank you for your suggestion.
    I am facing new problems... A coder fixed the problem for me to allow site administration again. However, right now all users (including regular users) can perform administrative tasks! (I tested out login with different users on different computers with cache cleared..)

    At site_admins of sitemeta table, it reads
    a:1:{s:5:"admin";b:1;}

    What do you suggest we look into?

  9. Cruz
    Member
    Posted 16 years ago #

    Is a:1:{i:0;s:5:"admin";} the current value for the site_admins field?

  10. andrea_r
    Moderator
    Posted 16 years ago #

    a:1:{i:0;s:5:"admin";}

    Yep.

    In the usermeta table it shows which users have what capabilities on what blogs as well.

    And just to clarify... when you sign is as a user (NOT Admin) on a user's blog, then cal see the meu in hte backend called "Site Admin", where they can manage the blogs?

  11. Cruz
    Member
    Posted 16 years ago #

    Hum.. strange. After changing the site_admins field to a:1:{i:0;s:5:"admin";}, the site would try to login at http://subdomain.wordpress.com.

  12. Cruz
    Member
    Posted 16 years ago #

    Yes. When logged in as regular user, I can still manage blogs just like an admin. Security risk.. I do not know what else to change to rectify this.. Please help..

  13. andrea_r
    Moderator
    Posted 16 years ago #

    Wow, that is so not the default behaviour... any chance you can wipe it out and reinstall with a fresh download?

    Also, are you *SURE* when you log into a user's blog, you are logging in as the admin of just that blog, and NOT the SiteAdmin?

    If you are logged in as the Site Admin, and you go to the backend of any user's blog, you WILL see the SiteAdmin menu. The admin of that blog, however, even though it is theirs, will NOT see the Site Admin menu.

    Just thought I'd clarify and spell it out as much as possible. :)

  14. Cruz
    Member
    Posted 16 years ago #

    Yes.. The problem is that even though on the very "top", it indicates the right identity - let's say "Yu7" <--- which is a regular blog user account, not admin.

    But, it can still see "Siteadmin" selection! Even worse is that the user can click and view all the blog listing just like an siteadmin! (A long time ago whenever something similar to this happen, that a regular user happen to see the siteadmin tab, upon clicking on the siteadmin tab, it would still say that I do not have enough privilege. But now it no longer does that.)

    It is possible that I can reinstall MU but I've highly customized the site.. Is there anything else that I should check? Maybe .htaccess file?

    Also I still do not understand why my modifying the field to "a:1:{i:0;s:5:"admin";}" would cause the blog to login at wordpress.com. Hum.. (What I mean by this is that I try to login at http://yu8.domain.com/wp-login.php, it would then directly me to http://yu8.wordpress.com/ and says that login failed.)

  15. andrea_r
    Moderator
    Posted 16 years ago #

    I don't understand either. :(

    "Is there anything else that I should check? Maybe .htaccess file?"
    Nope, it's not in the htacces file... it's all hardcoded, like "if logged in user is the site admin, then they can see this menu, if not, die"

  16. Cruz
    Member
    Posted 16 years ago #

    Ahh..
    Thank you Andrea_r..

  17. Cruz
    Member
    Posted 16 years ago #

    I found the following at menu.php starting from line 120:

    if (! user_can_access_admin_page()) {
    // find the blog of this user first
    $primary_blog = $wpdb->get_var( "SELECT meta_value FROM {$wpdb->usermeta} WHERE user_id = '$user_ID' AND meta_key = 'primary_blog'" );
    if( $primary_blog ) {
    header( "Location: " . get_blog_option( $primary_blog, "siteurl" ) . "wp-admin/" );
    exit;
    } else {
    header( "Location: http://{$current_user->data->user_login}.wordpress.com/wp-admin/" );
    exit;
    }
    die( __('You do not have sufficient permissions to access this page.') );
    }

    So I guess whenever admin check fails, it directs the page to "user_login/wordpress.com/wp-admin/"

  18. Cruz
    Member
    Posted 16 years ago #

    I just noticed something when I look at Siteadmin --> Blogs!

    It lists out ID, Blog Name, Last Updated, Registered, Users. For older blogs, the fields for "Users" are all empty! (Except for the main blog. It lists "admin" as the user for primary blog.) Only those that signed up recently have the "User" field properly filled up.

    Similarly, at Siteadmin --> Users, it lists out ID, Login, Email, Name, Registered, Blogs. For older users, the fields for "Blogs" are missing. Only those signed up recently have the blogs listed out properly.

    Perhaps one of the table data is missing that is causing the blogs and users not matching up properly? (Which in the end confuses the admin with the rest of the user?)

  19. billnoyes
    Member
    Posted 15 years ago #

    This just happened to me on my MU 1.2.3 install that I haven't had any problems with until now. In my case I found that the WP_Sitemeta table was damaged. A quick phpmyadmin repair solved the problem. I then immediately made a current backup since I don't want to rely on a repair to solve the problem next time.

  20. drmiketemp
    Member
    Posted 15 years ago #

    *chuckle* No, you don't. :)

    I know my own personal host makes a backup every day of her box. On my own boxes, we're doing a drive image backup every other day and individual account backups on the inbetween days.

    I know CPanel and Direct Admin have a way to download just a zip of your database(s) although both will only do it one at a time. I prefer this method as it will also take the zipped file back in while phpMyAdmin has those annoying upload limits.

  21. mickemus
    Member
    Posted 15 years ago #

    having the same issue... the Blogs submenu under Manage is MIA!! I have not added or changed anything on WPMU for months... (other than postings)!

  22. drmiketemp
    Member
    Posted 15 years ago #

    http://mu.wordpress.org/forums/topic.php?id=2219

    I believe the solution is contained within that thread. Also be sure to check your webserver's error logs to see if anything is being reported in there.

About this Topic