get_author_user_ids

Get all user IDs.

Description

(array) get_author_user_ids(); 

Returns (array)

List of user IDs.


Usage

  1. if ( !function_exists( 'get_author_user_ids' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/deprecated.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = get_author_user_ids(); 
  7.  

Defined (1)

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

/wp-admin/includes/deprecated.php  
  1. function get_author_user_ids() { 
  2. _deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' ); 
  3.  
  4. global $wpdb; 
  5. if ( !is_multisite() ) 
  6. $level_key = $wpdb->get_blog_prefix() . 'user_level'; 
  7. else 
  8. $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmu site admins don't have user_levels 
  9.  
  10. return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value != '0'", $level_key) );