_fill_many_users

Definition:
function _fill_many_users( &$users ) {}

Take an array of user objects, fill them with metas, and cache them.

Parameters

  • array $users: User objects
  • &$users

Source code

function _fill_many_users( &$users ) {

	$ids = array();

	foreach( $users as $user_object ) {

		$ids[] = $user_object->ID;

	}



	$metas = get_user_metavalues($ids);



	foreach ( $users as $user_object ) {

		if ( isset($metas[$user_object->ID]) ) {

			_fill_single_user($user_object, $metas[$user_object->ID]);

		}

	}

}

4315

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: