Elgg  Version 5.1
change_email.php
Go to the documentation of this file.
1 <?php
8 $guid = (int) elgg_extract('user_guid', $vars);
10  return get_user($guid);
11 });
12 
13 if (!$user instanceof \ElggUser || !$user->canEdit()) {
14  return;
15 }
16 
17 echo elgg_view_title(elgg_echo('admin:users:unvalidated:change_email:user', [$user->getDisplayName()]));
18 
19 echo elgg_view_field([
20  '#type' => 'hidden',
21  'name' => 'user_guid',
22  'value' => $user->guid,
23 ]);
24 
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 ]);
32 
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
$footer
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
const ELGG_SHOW_DISABLED_ENTITIES
Definition: constants.php:132
$guid
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
$vars
Definition: theme.php:5