Elgg  Version 2.3
resetpassword.php
Go to the documentation of this file.
1 <?php
17 $guid = get_input('guid');
19 
20 if (($user instanceof ElggUser) && ($user->canEdit())) {
22 
24  system_message(elgg_echo('admin:user:resetpassword:yes'));
25 
26  notify_user($user->guid,
27  elgg_get_site_entity()->guid,
28  elgg_echo('email:resetpassword:subject', array(), $user->language),
29  elgg_echo('email:resetpassword:body', array($user->username, $password), $user->language),
30  array(
31  'object' => $user,
32  'action' => 'resetpassword',
33  'password' => $password,
34  ),
35  'email');
36  } else {
37  register_error(elgg_echo('admin:user:resetpassword:no'));
38  }
39 } else {
40  register_error(elgg_echo('admin:user:resetpassword:no'));
41 }
42 
elgg_get_site_entity($site_guid=0)
Get an entity (default is current site)
Definition: sites.php:18
$user
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
force_user_password_reset($user_guid, $password)
Low level function to reset a given user&#39;s password.
Definition: users.php:167
elgg forward
Meant to mimic the php forward() function by simply redirecting the user to another page...
Definition: elgglib.js:425
$guid
get_input($variable, $default=null, $filter_result=true)
Get some input from variables passed submitted through GET or POST.
Definition: input.php:27
const REFERER
Definition: elgglib.php:2123
notify_user($to, $from=0, $subject= '', $message= '', array $params=array(), $methods_override=null)
Notify a user via their preferences.
$password
Definition: login.php:25
elgg system_message
Wrapper function for system_messages.
Definition: elgglib.js:390
elgg register_error
Wrapper function for system_messages.
Definition: elgglib.js:399
generate_random_cleartext_password()
Generate a random 12 character clear text password.
Definition: users.php:189
get_entity($guid)
Loads and returns an entity object from a guid.
Definition: entities.php:204