Elgg  Version 3.0
account.php
Go to the documentation of this file.
1 <?php
10 
11 $username = elgg_extract('username', $vars);
12 if (!$username) {
14 }
15 
17 if (!$user || !$user->canEdit()) {
18  throw new \Elgg\EntityPermissionsException();
19 }
20 
22 
23 elgg_push_breadcrumb(elgg_echo('settings'), "settings/user/$username");
24 
25 $title = elgg_echo('usersettings:user', [$user->getDisplayName()]);
26 
27 $content = elgg_view('core/settings/account', [
28  'entity' => $user,
29 ]);
30 
32  'content' => $content,
33  'title' => $title,
34  'show_owner_block_menu' => false,
35 ];
36 $body = elgg_view_layout('one_sidebar', $params);
37 
if(!$username) $user
Definition: account.php:16
$content
Definition: account.php:27
$params
Definition: account.php:31
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_set_page_owner_guid($guid)
Set the guid of the entity that owns this page.
Definition: pageowner.php:81
elgg_push_breadcrumb($text, $href=false)
Adds a breadcrumb to the breadcrumbs stack.
Definition: navigation.php:298
$title
Definition: account.php:25
elgg_view_page($title, $body, $page_shell= 'default', $vars=[])
Assembles and outputs a full page.
Definition: views.php:360
get_user_by_username($username)
Get user by username.
Definition: users.php:61
elgg_gatekeeper()
Used at the top of a page to mark it as logged in users only.
$body
Definition: account.php:36
elgg echo
Translates a string.
Definition: languages.js:43
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
$username
Definition: account.php:11
elgg_view_layout($layout_name, $vars=[])
Displays a layout with optional parameters.
Definition: views.php:593
$vars['type']
Definition: save.php:11
elgg_get_logged_in_user_entity()
Return the current logged in user, or null if no user is logged in.
Definition: sessions.php:29
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:246