minor touch-up: don't need to load the emergency contact's id when loading it as part of the user object.

This commit is contained in:
jacob 2011-02-23 17:35:50 +00:00
parent fa3a661b62
commit 74cfb14bf4

View File

@ -95,7 +95,7 @@ function user_load($users_id, $accounts_id = false)
// not sure if this is the best place to add it, but if the user is a student, add their emergency contacts
if(array_key_exists('participant', $u['roles'])){
$u['emergencycontacts'] = array();
$fields = array('id', 'firstname', 'lastname', 'relation', 'phone1', 'phone2', 'phone3', 'phone4', 'email');
$fields = array('firstname', 'lastname', 'relation', 'phone1', 'phone2', 'phone3', 'phone4', 'email');
$q = mysql_query("SELECT " . implode(',', $fields) . " FROM emergencycontact WHERE users_id = $users_id");
while($row = mysql_fetch_assoc($q)){
$u['emergencycontacts'][] = $row;