forked from science-ation/science-ation
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:
parent
fa3a661b62
commit
74cfb14bf4
@ -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
|
// 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'])){
|
if(array_key_exists('participant', $u['roles'])){
|
||||||
$u['emergencycontacts'] = array();
|
$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");
|
$q = mysql_query("SELECT " . implode(',', $fields) . " FROM emergencycontact WHERE users_id = $users_id");
|
||||||
while($row = mysql_fetch_assoc($q)){
|
while($row = mysql_fetch_assoc($q)){
|
||||||
$u['emergencycontacts'][] = $row;
|
$u['emergencycontacts'][] = $row;
|
||||||
|
Loading…
Reference in New Issue
Block a user