diff --git a/admin/committees.php b/admin/committees.php index 210de28..40b5949 100644 --- a/admin/committees.php +++ b/admin/committees.php @@ -255,27 +255,35 @@ if($_GET['unlinkmember'] && $_GET['unlinkcommittee']) { $q2=mysql_query("SELECT committees_link.title, committees_link.ord, - users.accounts_id, - MAX(users.year) AS my, - users.lastname + committees_link.accounts_id FROM committees_link - JOIN users ON users.accounts_id = committees_link.accounts_id WHERE committees_id='{$r->id}' - GROUP BY users.accounts_id - ORDER BY ord, - users.lastname "); + ORDER BY ord"); echo "\n"; echo mysql_error(); while($r2=mysql_fetch_object($q2)) { $u = user_load_by_accounts_id($r2->accounts_id); + + //if rollover is proper, this shouldnt be necessary, but, the simcoe rollover didnt do this, so lets do it here as a safety + if(!$u) { + $roleq=mysql_query("SELECT * FROM roles WHERE type='committee'"); + $roler=mysql_fetch_object($roleq); + //hmm thats okay,w e must have missed something in the rollover... sicne its tied to the accounts_id, we just need to add a record + account_add_role($r2->accounts_id,$roler->id,$conference['id']); + + //and now we should be able to load them + $u = user_load_by_accounts_id($r2->accounts_id); + } + + echo "