Skip to content

Instantly share code, notes, and snippets.

@chrissnyder2337
Created June 24, 2015 20:12
Show Gist options
  • Save chrissnyder2337/912db2030c158b0d878f to your computer and use it in GitHub Desktop.
Save chrissnyder2337/912db2030c158b0d878f to your computer and use it in GitHub Desktop.
acgi
<?php
$userCurrentCommittees = array(); // from drupal user
$agciUpdatedCommittees = array(); // from acgi
$committeesToRemove = $userCurrentCommittees;
foreach ($agciUpdatedCommittees as $committee){
// * run_update_committee_method
if (in_array($committee, $userCurrentCommittees)) {
// * remove $committee from $committeesToRemove
}
}
foreach ($committeesToRemove as $committee) {
// * remove committee from user / field collection
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment