get_author_user_ids()WP 1.0

Deprecated from version 3.1.0. It is no longer supported and can be removed in future releases. Use get_users() instead.

Get all user IDs.

No Hooks.

Return

Array. List of user IDs.

Usage

get_author_user_ids();

Notes

  • Global. wpdb. $wpdb WordPress database abstraction object.

Changelog

Deprecated since 3.1.0 Use get_users()

get_author_user_ids() code WP 6.6.2

function get_author_user_ids() {
	_deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );

	global $wpdb;
	if ( !is_multisite() )
		$level_key = $wpdb->get_blog_prefix() . 'user_level';
	else
		$level_key = $wpdb->get_blog_prefix() . 'capabilities'; // WPMU site admins don't have user_levels.

	return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value != '0'", $level_key) );
}