Support

Account

Home Forums Front-end Issues I can’t get userdata to show properly from a User Object select field Reply To: I can’t get userdata to show properly from a User Object select field

  • I tried that as well, and have the same result

    $args = array('orderby' => 'display_name',);
    $users = get_users($args);
    foreach($users as $user){		
    	
    	$userID = 'user_'.$user->ID ;
    	
    	echo '<li>';
    		echo '<b style="font-size:14px;">' . $user->data->display_name . ' x' . $user->emp_office_ext . '</b><br/>';
    		echo '<em style="font-size:12px;white-space: nowrap; ">' . get_field('position',$userID) . '</em>';
    		
    		if (!empty(the_field('manager',$userID))){									
    			$manager = get_field('manager');									
    			echo $manager['display_name'];
    		}
    	echo '</li>';
    }