aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-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.