diff options
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/users.php | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php index a87b241a2..6fe400f62 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -1509,7 +1509,7 @@ function elgg_user_hover_menu($hook, $type, $return, $params) { // prevent admins from banning or deleting themselves if (get_loggedin_userid() == $user->guid) { - return; + return $return; } if (isadminloggedin()) { @@ -1545,36 +1545,6 @@ function elgg_user_hover_menu($hook, $type, $return, $params) { } /** - * Setup the user admin menu - */ -function elgg_user_admin_menu($hook, $type, $return, $params) { - $user = $params['user']; - - $actions = array(); - if (!$user->isBanned()) { - $actions[] = 'ban'; - } else { - $actions[] = 'unban'; - } - $actions[] = 'delete'; - $actions[] = 'resetpassword'; - if (!$user->isAdmin()) { - $actions[] = 'makeadmin'; - } else { - $actions[] = 'removeadmin'; - } - - foreach ($actions as $action) { - $url = "action/admin/user/$action?guid={$user->guid}"; - $url = elgg_add_action_tokens_to_url($url); - $item = new ElggMenuItem($action, elgg_echo($action), $url); - $return[] = $item; - } - - return $return; -} - -/** * This function loads a set of default fields into the profile, then triggers a hook letting other plugins to edit * add and delete fields. * @@ -1754,7 +1724,6 @@ function users_init() { } elgg_register_plugin_hook_handler('register', 'menu:user_hover', 'elgg_user_hover_menu'); - elgg_register_plugin_hook_handler('register', 'menu:user_admin', 'elgg_user_admin_menu'); elgg_register_action("register", '', 'public'); elgg_register_action("useradd", '', 'public'); |