Elgg  Version 2.3
change_password.php
Go to the documentation of this file.
1 <?php
9 if (elgg_is_logged_in()) {
10  forward();
11 }
12 
14 
17 
19 
20 // don't check code here to avoid automated attacks
21 if (!$user instanceof ElggUser) {
22  register_error(elgg_echo('user:resetpassword:unknown_user'));
23  forward();
24 }
25 
26 $title = elgg_echo('changepassword');
27 
28 $params = array(
29  'guid' => $user_guid,
30  'code' => $code,
31 );
32 $content = elgg_view_form('user/changepassword', array('class' => 'elgg-form-account'), $params);
33 
34 if (elgg_get_config('walled_garden')) {
35  elgg_load_css('elgg.walled_garden');
36  $body = elgg_view_layout('walled_garden', array('content' => $content));
37  echo elgg_view_page($title, $body, 'walled_garden');
38 } else {
39  $body = elgg_view_layout('one_column', array(
40  'title' => $title,
41  'content' => $content,
42  ));
44 }
45 
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
elgg_is_logged_in()
Returns whether or not the user is currently logged in.
Definition: sessions.php:51
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_view_form($action, $form_vars=array(), $body_vars=array())
Definition: views.php:1345
elgg_signed_request_gatekeeper()
Validates if the HMAC signature of the current request is valid Issues 403 response if signature is i...
Definition: elgglib.php:1353
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
elgg_load_css($name)
Load a CSS file for this page.
Definition: elgglib.php:298
get_input($variable, $default=null, $filter_result=true)
Get some input from variables passed submitted through GET or POST.
Definition: input.php:27
elgg echo
Translates a string.
Definition: languages.js:48
if(!$user instanceof ElggUser) $title
$user_guid
elgg register_error
Wrapper function for system_messages.
Definition: elgglib.js:399
get_entity($guid)
Loads and returns an entity object from a guid.
Definition: entities.php:204
elgg_view_page($title, $body, $page_shell= 'default', $vars=array())
Assembles and outputs a full page.
Definition: views.php:447
$content