Elgg  Version master
change_password.php
Go to the documentation of this file.
1 <?php
7 
8 $user_guid = (int) get_input('u');
9 
11 
12 // don't check code here to avoid automated attacks
13 if (!$user instanceof ElggUser) {
14  throw new EntityNotFoundException(elgg_echo('user:changepassword:unknown_user'));
15 }
16 
17 $content = elgg_view_form('user/changepassword', [
18  'class' => 'elgg-form-account',
19 ], [
20  'guid' => $user_guid,
21  'code' => get_input('c'),
22 ]);
23 
24 echo elgg_view_page(elgg_echo('changepassword'), [
25  'content' => $content,
26  'sidebar' => false,
27  'filter' => false,
28 ], 'walled_garden');
if(! $user instanceof ElggUser) $content
$user_guid
get_input(string $variable, $default=null, bool $filter_result=true)
Parameter input functions.
Definition: input.php:20
get_user(int $guid)
Elgg users Functions to manage multiple or single users in an Elgg install.
Definition: users.php:16
elgg_echo(string $message_key, array $args=[], string $language='')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
elgg_view_form(string $action, array $form_vars=[], array $body_vars=[])
Definition: views.php:1044
elgg_view_page(string $title, string|array $body, string $page_shell='default', array $vars=[])
Assembles and outputs a full page.
Definition: views.php:237