Elgg  Version 2.3
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 = '';
20  $admin .= elgg_view_field(array(
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:1424
elgg_is_admin_logged_in()
Returns whether or not the viewer is currently logged in and an admin user.
Definition: sessions.php:60
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
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
Translates a string.
Definition: languages.js:48
$content
Definition: password.php:39
elgg_get_page_owner_entity()
Gets the owner entity for the current page.
Definition: pageowner.php:56
elgg_view_module($type, $title, $body, array $vars=array())
Wrapper function for the module display pattern.
Definition: views.php:1250
if(!$user instanceof ElggUser) $title
Definition: password.php:15
$password2
Definition: password.php:33
elgg_get_logged_in_user_guid()
Return the current logged in user by guid.
Definition: sessions.php:42
$admin
Definition: password.php:18
$user
Definition: password.php:9