Elgg  Version master
requestnewpassword.php
Go to the documentation of this file.
1 <?php
6 $username = elgg_extract('username', $vars, '');
7 
8 echo elgg_view('output/longtext', ['value' => elgg_echo('user:password:text')]);
9 
10 echo elgg_view_field([
11  '#type' => 'text',
12  '#label' => elgg_echo('loginusername'),
13  'name' => 'username',
14  'value' => $username,
15  'autofocus' => empty($username),
16 ]);
17 
18 echo elgg_view_field(['#type' => 'captcha']);
19 
21  '#type' => 'submit',
22  'text' => elgg_echo('request'),
23 ]);
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1112
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:254
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
elgg_set_form_footer(string $footer= '')
Sets form footer and defers its rendering until the form view and extensions have been rendered...
Definition: views.php:1046
$username
Action to request a new password.
$vars
Definition: theme.php:5