Elgg  Version 3.0
password.php
Go to the documentation of this file.
1 <?php
2 
10 
11 if (!$user instanceof ElggUser) {
12  return;
13 }
14 
15 $title = elgg_echo('user:set:password');
16 
17 // only make the admin user enter current password for changing his own password.
18 $admin = '';
21  '#type' => 'password',
22  'name' => 'current_password',
23  '#label' => elgg_echo('user:current_password:label'),
24  ]);
25 }
26 
28  '#type' => 'password',
29  'name' => 'password',
30  '#label' => elgg_echo('user:password:label'),
31  ]);
32 
34  '#type' => 'password',
35  'name' => 'password2',
36  '#label' => elgg_echo('user:password2:label')
37  ]);
38 
40 
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1395
elgg_is_admin_logged_in()
Returns whether or not the viewer is currently logged in and an admin user.
Definition: sessions.php:57
$password2
Definition: password.php:33
$user
Definition: password.php:9
if(!elgg_is_admin_logged_in()||elgg_is_admin_logged_in()&&$user->guid==elgg_get_logged_in_user_guid()) $password
Definition: password.php:27
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
if(!$user instanceof ElggUser) $title
Definition: password.php:15
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
$admin
Definition: password.php:18
$content
Definition: password.php:39
elgg_get_page_owner_entity()
Gets the owner entity for the current page.
Definition: pageowner.php:65
elgg_get_logged_in_user_guid()
Return the current logged in user by guid.
Definition: sessions.php:39