Elgg  Version 3.0
email.php
Go to the documentation of this file.
1 <?php
10 
11 if (!$user instanceof ElggUser) {
12  return;
13 }
14 
15 $title = elgg_echo('email:settings');
16 
17 $content = '';
18 if (elgg_get_config('security_email_require_password') && ($user->getGUID() === elgg_get_logged_in_user_guid())) {
19  // user needs to provide current password in order to be able to change his/her email address
21  '#type' => 'password',
22  '#label' => elgg_echo('email:address:password'),
23  '#help' => elgg_echo('email:address:password:help'),
24  'name' => 'email_password',
25  ]);
26 }
27 
29  '#type' => 'email',
30  'name' => 'email',
31  'value' => $user->email,
32  '#label' => elgg_echo('email:address:label'),
33 ]);
34 
if(!$user instanceof ElggUser) $title
Definition: email.php:15
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1395
$content
Definition: email.php:17
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_view_module($type, $title, $body, array $vars=[])
Wrapper function for the module display pattern.
Definition: views.php:1198
elgg echo
Translates a string.
Definition: languages.js:43
elgg_get_page_owner_entity()
Gets the owner entity for the current page.
Definition: pageowner.php:65
$user
Definition: email.php:9
elgg_get_logged_in_user_guid()
Return the current logged in user by guid.
Definition: sessions.php:39
elgg_get_config($name, $default=null)
Get an Elgg configuration value.