Elgg  Version 5.1
Go to the documentation of this file.
1 <?php
8 $guid = (int) elgg_extract('user_guid', $vars);
10  return get_user($guid);
11 });
13 if (!$user instanceof \ElggUser || !$user->canEdit()) {
14  return;
15 }
17 echo elgg_view_title(elgg_echo('admin:users:unvalidated:change_email:user', [$user->getDisplayName()]));
19 echo elgg_view_field([
20  '#type' => 'hidden',
21  'name' => 'user_guid',
22  'value' => $user->guid,
23 ]);
25 echo elgg_view_field([
26  '#type' => 'email',
27  '#label' => elgg_echo('email:address:label'),
28  'name' => 'email',
29  'value' => $user->email,
30  'required' => true,
31 ]);
34  '#type' => 'submit',
35  'text' => elgg_echo('save'),
36 ]);
elgg_call(int $flags, Closure $closure)
Calls a callable autowiring the arguments using public DI services and applying logic based on flags...
Definition: elgglib.php:299
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1133
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
if(empty($guid)||empty($email)) if(!elgg_is_valid_email($email)) $user
elgg_view_title(string $title, array $vars=[])
Renders a title.
Definition: views.php:836
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_set_form_footer(string $footer= '')
Sets form footer and defers its rendering until the form view and extensions have been rendered...
Definition: views.php:1067
Definition: constants.php:132
Admin action to change the email address of an user.
Definition: change_email.php:6
get_user(int $guid)
Elgg users Functions to manage multiple or single users in an Elgg install.
Definition: users.php:16
Definition: theme.php:5