diff --git a/html/inc/user.inc b/html/inc/user.inc index d3f40d7af5..0454811925 100644 --- a/html/inc/user.inc +++ b/html/inc/user.inc @@ -344,17 +344,16 @@ function show_user_summary_public($user) { // @param user The user to produce a community links object for function get_community_links_object($user){ + $cache_object = new StdClass; $cache_object->post_count = total_posts($user); $cache_object->user = $user; $cache_object->team = lookup_team($user->teamid); + $cache_object->friends = array(); $friends = BoincFriend::enum("user_src=$user->id and reciprocated=1"); - $n = count($friends); - if ($n) { - foreach($friends as $friend) { - $fuser = BoincUser::lookup_id($friend->user_dest); - $cache_object->friends[] = $fuser; - } + foreach($friends as $friend) { + $fuser = BoincUser::lookup_id($friend->user_dest); + $cache_object->friends[] = $fuser; } return $cache_object; } diff --git a/html/user/show_user.php b/html/user/show_user.php index 77d915e87b..c7d9fa1a8f 100644 --- a/html/user/show_user.php +++ b/html/user/show_user.php @@ -75,6 +75,7 @@ if ($format=="xml"){ $user = @get_other_projects($user); $community_links = get_community_links_object($user); + $data = new StdClass; $data->user = $user; $data->clo = $community_links; set_cached_data(USER_PAGE_TTL, serialize($data), $cache_args); diff --git a/html/user/team_email_list.php b/html/user/team_email_list.php index 33145a5c80..daa8749d0b 100644 --- a/html/user/team_email_list.php +++ b/html/user/team_email_list.php @@ -39,7 +39,7 @@ if ($xml) { $user = lookup_user_auth($account_key); $show_email = ($user && is_team_founder($user, $team)); echo "\n"; - $users = BoincUser::enum_fields("id, email_addr, send_email, name, total_credit, expavg_credit, has_profile, donated, country, cross_project_id, create_time, url", "teamid=$team->id"); + $users = BoincUser::enum_fields("id, email_addr, send_email, name, total_credit, expavg_credit, expavg_time, has_profile, donated, country, cross_project_id, create_time, url", "teamid=$team->id"); //$users = BoincUser::enum("teamid=$team->id"); foreach($users as $user) { show_team_member($user, $show_email, $creditonly);