I am using 'get_users' to generate an array or all WordPress users with the role 'moderator', my code looks like this..
<?php
$args = array(
'fields' => 'first_name',
'role' => 'moderator'
);
$temp = get_users($args);
?>
<?php foreach ($temp as $i => $item): ?>
<input type="checkbox" name="<?php $mb->the_name(); ?>" value="<?php echo $item; ?>"<?php $mb->the_checkbox_state($item); ?>/> <?php echo $item; ?><br/>
<?php endforeach; ?>
This works but instead of returning the users first name it returns the users id. Does anybody know why this is happening?