isBanned(); $user = $vars['entity']; $checkbox = "guid\">"; $first_login = elgg_view_friendly_time($user->time_created); $last_login = elgg_view_friendly_time($user->last_login); $last_action = elgg_view_friendly_time($user->last_action); $objects = elgg_get_entities(array( 'owner_guid' => $user->guid, 'count' => true )); $db_prefix = elgg_get_config('dbprefix'); $q = "SELECT COUNT(id) as count FROM {$db_prefix}annotations WHERE owner_guid = $user->guid"; $data = get_data($q); $annotations = (int) $data[0]->count; $q = "SELECT COUNT(id) as count FROM {$db_prefix}metadata WHERE owner_guid = $user->guid"; $data = get_data($q); $metadata = (int) $data[0]->count; // the CSS for classless is really, really annoying. $info = <<<___HTML $checkbox $user->name | $user->username | $user->email | $user->guid Last login: $last_login | First login: $first_login | Last action: $last_action Objects: $objects | Annotations: $annotations | Metadata: $metadata ___HTML; if ($banned) { $info .= ''; $info .= elgg_echo('profile:banned'); $info .= ''; $info .= $user->ban_reason; $info .= ''; } $info .= ''; echo elgg_view('page/components/image_block', array('image' => $icon, 'body' => $info)); }
$checkbox $user->name | $user->username | $user->email | $user->guid
Last login: $last_login | First login: $first_login | Last action: $last_action
Objects: $objects | Annotations: $annotations | Metadata: $metadata