Elgg  Version 3.0
user.php
Go to the documentation of this file.
1 <?php
2 
3 $user = elgg_extract('entity', $vars);
4 if (!$user instanceof ElggUser) {
5  return;
6 }
7 
8 $checkbox = elgg_view('input/checkbox', [
9  'name' => 'user_guids[]',
10  'value' => $user->guid,
11  'default' => false,
12  'id' => "unvalidated-user-{$user->guid}",
13 ]);
14 
15 $menu = elgg_view_menu('user:unvalidated', [
16  'entity' => $user,
17  'class' => 'elgg-menu-hz',
18 ]);
19 
20 $title = [];
21 $title[] = elgg_format_element('span', ['title' => elgg_echo('username')], "{$user->username}:");
22 $title[] = elgg_format_element('span', ['title' => elgg_echo('name')], "\"{$user->getDisplayName()}\"");
23 $title[] = elgg_format_element('span', ['title' => elgg_echo('email')], "&lt;{$user->email}&gt;");
24 
25 $title = elgg_format_element('label', ['for' => "unvalidated-user-{$user->guid}"], implode(' ', $title));
26 
27 $subtitle = [];
28 $subtitle[] = elgg_echo('admin:users:unvalidated:registered', [elgg_view_friendly_time($user->time_created)]);
29 
31  'title' => $title,
32  'metadata' => $menu,
33  'subtitle' => implode(' ', $subtitle),
34 ];
36 
37 $content = elgg_view('user/elements/summary', $params);
38 
if(!$item instanceof ElggUser) $vars['item_view']
Definition: user.php:15
$subtitle
Definition: user.php:27
$content
Definition: user.php:37
if(!$user instanceof ElggUser) $checkbox
Definition: user.php:8
$user
Definition: user.php:3
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$params
Definition: user.php:30
elgg_view_image_block($image, $body, $vars=[])
Wrapper function for the image block display pattern.
Definition: views.php:1177
elgg_view_menu($menu, array $vars=[])
Render a menu.
Definition: views.php:755
$title
Definition: user.php:20
elgg_format_element($tag_name, array $attributes=[], $text= '', array $options=[])
Format an HTML element.
Definition: output.php:168
elgg echo
Translates a string.
Definition: languages.js:43
$menu
Definition: user.php:15
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1131
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:246
elgg_view_friendly_time($time)
Displays a UNIX timestamp in a friendly way.
Definition: views.php:1120