Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
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_input('password', array(
21  'name' => 'current_password',
22  'label' => elgg_echo('user:current_password:label'),
23  ));
24 }
25 
26 $password = elgg_view_input('password', array(
27  'name' => 'password',
28  'label' => elgg_echo('user:password:label'),
29  ));
30 
31 $password2 = elgg_view_input('password', array(
32  'name' => 'password2',
33  'label' => elgg_echo('user:password2:label')
34  ));
35 
37 
38 echo elgg_view_module('info', $title, $content);
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:26
elgg_view_input($input_type, array $vars=array())
Renders a form field.
Definition: views.php:1332
$content
Definition: password.php:36
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:1207
if(!$user instanceof ElggUser) $title
Definition: password.php:15
$password2
Definition: password.php:31
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