aboutsummaryrefslogtreecommitdiff
path: root/actions/admin/user/resetpassword.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-17 12:38:14 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-17 12:38:14 +0000
commitfc7f4e880ddfed812438fabc791c5f5056f541e6 (patch)
tree41e6146d1dc35e149b75047c9deef3f937765051 /actions/admin/user/resetpassword.php
parent66b0b9fe69ed698249b35ccfa8b601110fa99964 (diff)
downloadelgg-fc7f4e880ddfed812438fabc791c5f5056f541e6.tar.gz
elgg-fc7f4e880ddfed812438fabc791c5f5056f541e6.tar.bz2
Closes #1422 admin user actions now check for self before banning, deleting, or removing admin privileges
git-svn-id: http://code.elgg.org/elgg/trunk@7332 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions/admin/user/resetpassword.php')
-rw-r--r--actions/admin/user/resetpassword.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/actions/admin/user/resetpassword.php b/actions/admin/user/resetpassword.php
index 24127eb8b..14de69cb6 100644
--- a/actions/admin/user/resetpassword.php
+++ b/actions/admin/user/resetpassword.php
@@ -17,22 +17,22 @@
admin_gatekeeper();
$guid = get_input('guid');
-$obj = get_entity($guid);
+$user = get_entity($guid);
-if (($obj instanceof ElggUser) && ($obj->canEdit())) {
+if (($user instanceof ElggUser) && ($user->canEdit())) {
$password = generate_random_cleartext_password();
// Always reset the salt before generating the user password.
- $obj->salt = generate_random_cleartext_password();
- $obj->password = generate_user_password($obj, $password);
+ $user->salt = generate_random_cleartext_password();
+ $user->password = generate_user_password($user, $password);
- if ($obj->save()) {
+ if ($user->save()) {
system_message(elgg_echo('admin:user:resetpassword:yes'));
- notify_user($obj->guid,
+ notify_user($user->guid,
$CONFIG->site->guid,
elgg_echo('email:resetpassword:subject'),
- elgg_echo('email:resetpassword:body', array($obj->username, $password)),
+ elgg_echo('email:resetpassword:body', array($user->username, $password)),
NULL,
'email');
} else {