Elgg  Version 1.9
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  'email');
32  } else {
33  register_error(elgg_echo('admin:user:resetpassword:no'));
34  }
35 } else {
36  register_error(elgg_echo('admin:user:resetpassword:no'));
37 }
38 
elgg_get_site_entity($site_guid=0)
Get an ElggSite entity (default is current site)
Definition: sites.php:18
$user
get_input($variable, $default=null, $filter_result=true)
Get some input from variables passed submitted through GET or POST.
Definition: input.php:27
force_user_password_reset($user_guid, $password)
Low level function to reset a given user&#39;s password.
Definition: users.php:429
elgg forward
Meant to mimic the php forward() function by simply redirecting the user to another page...
Definition: elgglib.js:419
$guid
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
const REFERER
Definition: elgglib.php:2162
$password
Definition: login.php:25
elgg system_message
Wrapper function for system_messages.
Definition: elgglib.js:374
elgg register_error
Wrapper function for system_messages.
Definition: elgglib.js:383
notify_user($to, $from, $subject, $message, array $params=array(), $methods_override="")
Notify a user via their preferences.
generate_random_cleartext_password()
Generate a random 12 character clear text password.
Definition: users.php:509
get_entity($guid)
Loads and returns an entity object from a guid.
Definition: entities.php:604