Elgg  Version 4.3
password.php
Go to the documentation of this file.
1 <?php
9 if (!$user instanceof ElggUser) {
10  return;
11 }
12 
13 // only make the admin user enter current password for changing his own password.
14 $content = '';
17  '#type' => 'password',
18  '#label' => elgg_echo('user:current_password:label'),
19  'name' => 'current_password',
20  'autocomplete' => 'current-password',
21  ]);
22 }
23 
25  '#type' => 'password',
26  '#label' => elgg_echo('user:password:label'),
27  'name' => 'password',
28  'autocomplete' => 'new-password',
29  'add_security_requirements' => true,
30 ]);
31 
33  '#type' => 'password',
34  '#label' => elgg_echo('user:password2:label'),
35  'name' => 'password2',
36  'autocomplete' => 'new-password',
37  'add_security_requirements' => true,
38 ]);
39 
40 echo elgg_view_module('info', elgg_echo('user:set:password'), $content);
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1143
elgg_is_admin_logged_in()
Returns whether or not the viewer is currently logged in and an admin user.
Definition: sessions.php:52
$user
Provide a way of setting your password.
Definition: password.php:8
$vars['class']
Elgg password input Displays a password input field.
Definition: password.php:13
elgg_echo($message_key, array $args=[], $language="")
Elgg language module Functions to manage language and translations.
Definition: languages.php:18
elgg_view_module($type, $title, $body, array $vars=[])
Wrapper function for the module display pattern.
Definition: views.php:944
if(!$user instanceof ElggUser) $content
Definition: password.php:14
elgg_get_page_owner_entity()
Gets the owner entity for the current page.
Definition: pageowner.php:23
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
elgg_get_logged_in_user_guid()
Return the current logged in user by guid.
Definition: sessions.php:34