aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-26 16:30:32 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-26 16:30:32 +0000
commitb2c8624c1069829f815ebfcbaa18d06a27dde34e (patch)
tree656ed5d5c6ecf2acdfd2412a6e3e5135c4c25cc6 /engine
parent31c5b57b92b2b2442527cc601eab113e047b0e93 (diff)
downloadelgg-b2c8624c1069829f815ebfcbaa18d06a27dde34e.tar.gz
elgg-b2c8624c1069829f815ebfcbaa18d06a27dde34e.tar.bz2
Closes #16: Administration: Reset password functionality on user admin screen
http://trac.elgg.org/elgg/ticket/16 git-svn-id: https://code.elgg.org/elgg/trunk@1150 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/admin.php5
-rw-r--r--engine/lib/users.php11
2 files changed, 15 insertions, 1 deletions
diff --git a/engine/lib/admin.php b/engine/lib/admin.php
index 3c34b51c1..47704a4be 100644
--- a/engine/lib/admin.php
+++ b/engine/lib/admin.php
@@ -45,7 +45,10 @@
extend_elgg_admin_page('admin/main_opt/user', 'admin/main');
extend_elgg_admin_page('admin/main_opt/plugins', 'admin/main', 999); // Always last
-
+ register_action('admin/user/ban', false, "", true);
+ register_action('admin/user/delete', false, "", true);
+ register_action('admin/user/resetpassword', false, "", true);
+
// Register some actions
register_action('admin/site/update_basic', false, "", true); // Register basic site admin action
}
diff --git a/engine/lib/users.php b/engine/lib/users.php
index d8fc53f79..554ada22b 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -813,6 +813,17 @@
}
/**
+ * Simple function that will generate a random clear text password suitable for feeding into generate_user_password().
+ *
+ * @see generate_user_password
+ * @return string
+ */
+ function generate_random_cleartext_password()
+ {
+ return substr(md5(microtime()), 0, 8);
+ }
+
+ /**
* Generate a password for a user, currently uses MD5.
*
* Later may introduce salting etc.