Elgg  Version 2.3
account.php
Go to the documentation of this file.
1 <?php
9 // Only logged in users
11 
12 // Make sure we don't open a security hole ...
13 if ((!elgg_get_page_owner_entity()) || (!elgg_get_page_owner_entity()->canEdit())) {
14  register_error(elgg_echo('noaccess'));
15  forward('/');
16 }
17 
18 $username = elgg_extract('username', $vars);
19 
20 elgg_push_breadcrumb(elgg_echo('settings'), "settings/user/$username");
21 
22 $title = elgg_echo('usersettings:user', array(elgg_get_page_owner_entity()->name));
23 
24 $content = elgg_view('core/settings/account');
25 
26 $params = array(
27  'content' => $content,
28  'title' => $title,
29 );
30 $body = elgg_view_layout('one_sidebar', $params);
31 
$content
Definition: account.php:24
if((!elgg_get_page_owner_entity())||(!elgg_get_page_owner_entity() ->canEdit())) $username
Definition: account.php:18
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$params
Definition: account.php:26
elgg_view_layout($layout_name, $vars=array())
Displays a layout with optional parameters.
Definition: views.php:689
elgg forward
Meant to mimic the php forward() function by simply redirecting the user to another page...
Definition: elgglib.js:425
$vars['entity']
$title
Definition: account.php:22
elgg_gatekeeper()
Used at the top of a page to mark it as logged in users only.
Definition: pagehandler.php:58
$body
Definition: account.php:30
elgg echo
Translates a string.
Definition: languages.js:48
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:336
elgg_get_page_owner_entity()
Gets the owner entity for the current page.
Definition: pageowner.php:56
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:1375
$site name
elgg register_error
Wrapper function for system_messages.
Definition: elgglib.js:399
elgg_view_page($title, $body, $page_shell= 'default', $vars=array())
Assembles and outputs a full page.
Definition: views.php:447