Elgg  Version 3.0
online.php
Go to the documentation of this file.
1 <?php
10 if (!$user instanceof ElggUser) {
11  return;
12 }
13 
14 $label_name = elgg_echo('usersettings:statistics:label:name');
15 $label_email = elgg_echo('usersettings:statistics:label:email');
16 $label_member_since = elgg_echo('usersettings:statistics:label:membersince');
17 $label_last_login = elgg_echo('usersettings:statistics:label:lastlogin');
18 
19 $time_created = elgg_view('output/date', [
20  'value' => $user->time_created,
21  'format' => DATE_RFC2822,
22 ]);
23 $last_login = elgg_view('output/date', [
24  'value' => $user->last_login,
25  'format' => DATE_RFC2822,
26 ]);
27 
28 $title = elgg_echo('usersettings:statistics:yourdetails');
29 
30 $content = <<<__HTML
31 <table class="elgg-table-alt">
32  <tr>
33  <td class="column-one">$label_name</td>
34  <td>{$user->getDisplayName()}</td>
35  </tr>
36  <tr>
37  <td class="column-one">$label_email</td>
38  <td>$user->email</td>
39  </tr>
40  <tr>
41  <td class="column-one">$label_member_since</td>
42  <td>$time_created</td>
43  </tr>
44  <tr>
45  <td class="column-one">$label_last_login</td>
46  <td>$last_login</td>
47  </tr>
48 </table>
49 __HTML;
50 
$last_login
Definition: online.php:23
$title
Definition: online.php:28
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$label_email
Definition: online.php:15
$label_member_since
Definition: online.php:16
elgg_view_module($type, $title, $body, array $vars=[])
Wrapper function for the module display pattern.
Definition: views.php:1198
$label_last_login
Definition: online.php:17
$time_created
Definition: online.php:19
elgg echo
Translates a string.
Definition: languages.js:43
elgg_get_page_owner_entity()
Gets the owner entity for the current page.
Definition: pageowner.php:65
$content
Definition: online.php:30
$user
Definition: online.php:9
if(!$user instanceof ElggUser) $label_name
Definition: online.php:14
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:246