is_user_admin

Whether the current request is for a user admin screen.

Description

is_user_admin(); 

e.g. /wp-admin/user/

Does not inform on whether the user is an admin! Use capability checks to tell if the user should be accessing a section or not current_user_can().


Usage

  1. if ( !function_exists( 'is_user_admin' ) ) { 
  2. require_once ABSPATH . WPINC . '/load.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = is_user_admin(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/load.php  
  1. function is_user_admin() { 
  2. if ( isset( $GLOBALS['current_screen'] ) ) 
  3. return $GLOBALS['current_screen']->in_admin( 'user' ); 
  4. elseif ( defined( 'WP_USER_ADMIN' ) ) 
  5. return WP_USER_ADMIN
  6.  
  7. return false;