Elgg  Version 4.3
change_email.php
Go to the documentation of this file.
1 <?php
8 $guid = 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 
20  '#type' => 'hidden',
21  'name' => 'user_guid',
22  'value' => $user->guid,
23 ]);
24 
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  'value' => 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:592
$footer
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1143
get_user($guid)
Get a user object from a GUID.
Definition: users.php:20
if(empty($guid)||empty($email)) if(!elgg_is_valid_email($email)) $user
elgg_echo($message_key, array $args=[], $language="")
Elgg language module Functions to manage language and translations.
Definition: languages.php:18
elgg_set_form_footer($footer= '')
Sets form footer and defers its rendering until the form view and extensions have been rendered...
Definition: views.php:1077
const ELGG_SHOW_DISABLED_ENTITIES
Definition: constants.php:148
$guid
Admin action to change the email address of an user.
Definition: change_email.php:6
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:547
elgg echo
Translates a string.
Definition: deprecated.js:530
$vars['head']
Definition: html.php:24
elgg_view_title($title, array $vars=[])
Renders a title.
Definition: views.php:842