is_user_admin() in WordPress: What It Checks [Guide]

is_user_admin() in WordPress — function guide thumbnail

You open a screen under /wp-admin/user/ and reach for a WordPress conditional tag. The name suggests it tells you the visitor is an administrator — it does not.

That’s what is_user_admin() is for: a conditional tag that reports whether the current request targets the user administration area. Here you’ll see what it returns, how it differs from is_admin(), where WordPress core calls it, and a copy-paste example.

What does is_user_admin() do?

Introduced in WordPress 3.1.0, is_user_admin() returns true only when the current request points at a user admin screen, such as /wp-admin/user/ or /wp-admin/user/profile.php. Those screens mainly exist in Multisite networks, so on a single site you rarely meet the function in daily work. It works off the global $current_screen object and takes no parameters.

<?php
function is_user_admin() {
    if ( isset( $GLOBALS['current_screen'] ) ) {
        return $GLOBALS['current_screen']->in_admin( 'user' );
    } elseif ( defined( 'WP_USER_ADMIN' ) ) {
        return WP_USER_ADMIN;
    }

    return false;
}

The first branch asks the current screen object whether it belongs to the user admin area. The fallback reads the WP_USER_ADMIN constant when the screen object is not set yet — for example on very early admin requests. In every other case the answer is false.

is_user_admin() vs is_admin()

The two names confuse almost everyone at least once. is_user_admin() asks: is this the user admin screen? is_admin() asks: is this any wp-admin screen? Neither tells you whether the current user holds the administrator role — for that, WordPress expects capability checks with current_user_can().

Tip: never use is_user_admin() (or is_admin()) as a security check. Both describe the screen, not the person viewing it.

Example: using is_user_admin()

A common use is loading extra styles or scripts only on the user admin screens, so the regular dashboard stays untouched:

<?php

if ( is_user_admin() ) {
    // Running inside /wp-admin/user/ screens.
    add_action( 'admin_enqueue_scripts', 'my_user_admin_assets' );
}

Where WordPress uses is_user_admin()

Core itself relies on the check in a handful of places:

  • get_edit_profile_url() builds the profile URL differently for user admin, network admin, and the regular dashboard.
  • self_admin_url() returns a URL that points at the current site admin or the network admin, depending on context.

None of these cases involve checking who the user is — only which screen is being rendered.

The function belongs to a small family of admin-screen checks:

  • is_admin() — any screen under /wp-admin/ or the block editor.
  • is_network_admin() — the Multisite network dashboard at /wp-admin/network/.
  • is_blog_admin() — an individual site’s dashboard, not the network layer.
  • is_user_admin() — the narrow user admin screens under /wp-admin/user/.

FAQs About is_user_admin()

What does is_user_admin() return?

A boolean: true inside user administration pages, false everywhere else.

Is is_user_admin() the same as is_admin()?

No. Every user admin screen is an admin screen, but most admin screens are not user admin screens.

Does is_user_admin() check the user role?

No. Use current_user_can() for roles and capabilities.

Which WordPress version introduced it?

Version 3.1.0.

Why do I never see user admin screens?

They are tied to Multisite user management. On a single-site install the URL rarely exists, so the function almost always returns false.

Conclusion

is_user_admin() is a narrow screen check for /wp-admin/user/, not a role test. Use it for layout tweaks on those screens; use current_user_can() for anything security-related.

Related reading: the username_exists() guide and the add_meta_box() guide. Building custom admin screens or plugins? See my WordPress plugin development services — or reach out to me directly.

About The Author

Picture of Andriy Haydash

Andriy Haydash

Andriy Haydash is a WordPress Expert who helps people build and launch successful WordPress membership and e-learning websites.

Note: Not all of the articles are written directly by me.
Affiliate Disclaimer: Some links in the post may be my affiliate links

The Ultimate Managed Hosting Platform

Before YOU Leave...
Join My Newsletter

Get practical tips & tricks on how to start, grow and market your course/membership site.