lewismcarey/User-Field-ACF-Add-on — pull request #10 by adampope (2012-09-07 10:38:32+00:00)
Title: Cope with deleted users

If the user has been deleted since they were selected by ACF then we get a bunch of errors. This change checks they exist before trying to use them.

Calling code then has to cope with the missing data e.g.

$users = get_field('users');

foreach($users as $user){

if(!isset($user) || $user == null || !is_array($user)){
continue; // Or print something saying the user has been deleted
}

// do something with the user
}