The MU forums have moved to WordPress.org

how to check if blog admin is logged in (3 posts)

  1. Melodiefabrieknl
    Member
    Posted 16 years ago #

    I am trying to offer only a couple of options to the admin user of the blog, so not only for the sitewide admin, but also for the admin of one blog.

    how can I check if the logged in user is admin?

    I tried it with these 3 methods:
    get_profile('user_login') == 'admin'

    is_site_admin()

    $current_user->wp_capabilities['administrator']

    That doesn't work. Anyone?

  2. dsader
    Member
    Posted 16 years ago #

    if ( current_user_can('edit_plugins') )

    other administrator capabilities(from http://codex.wordpress.org/Roles_and_Capabilities )

    switch_themes
    edit_themes
    activate_plugins
    edit_plugins
    edit_users
    edit_files
    manage_options
    import
  3. Melodiefabrieknl
    Member
    Posted 16 years ago #

    thanks for the help. thanks works. I need to check the blog-admin and now I am able to do this with this:
    current_user_can('edit_users')

    cool!

About this Topic

  • Started 16 years ago by Melodiefabrieknl
  • Latest reply from Melodiefabrieknl