Skip to content

Instantly share code, notes, and snippets.

@chadsten
Created October 23, 2013 21:59
Show Gist options
  • Select an option

  • Save chadsten/7127534 to your computer and use it in GitHub Desktop.

Select an option

Save chadsten/7127534 to your computer and use it in GitHub Desktop.
<? // request the array of UID and criteria information
$users = get_user_entities(get_users());
foreach ($users as $user) {
dpm($user);
foreach ($user->collections as $collection) {
// we only check to see if it's been set by the user and doesn't match,
// so we catch matches and unsets if no continues are met in the ifs
if (isset($collection->field_listing_type[LANGUAGE_NONE][0]['value'] && $collection->field_listing_type[LANGUAGE_NONE][0]['value'] !== $listing['type']) {
continue;
}
//2nd if
//3rd if
//4th if
//queue email to this user
dpm($collection);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment