diff options
Diffstat (limited to 'actions/admin')
-rw-r--r-- | actions/admin/user/ban.php | 15 | ||||
-rw-r--r-- | actions/admin/user/delete.php | 5 |
2 files changed, 14 insertions, 6 deletions
diff --git a/actions/admin/user/ban.php b/actions/admin/user/ban.php index 100854062..256803bf5 100644 --- a/actions/admin/user/ban.php +++ b/actions/admin/user/ban.php @@ -10,6 +10,8 @@ * @link http://elgg.org/ */ + require_once("../../../engine/start.php"); + // block non-admin users admin_gatekeeper(); @@ -19,13 +21,14 @@ if ( ($obj instanceof ElggUser) && ($obj->canEdit())) { - - // TODO: Ban user - throw new NotImplementedException("WRITEME"); - - - + if ($obj->disable()) + system_message(elgg_echo('admin:user:ban:yes')); + else + system_message(elgg_echo('admin:user:ban:no')); } else system_message(elgg_echo('admin:user:ban:no')); + + header("Location: {$CONFIG->wwwroot}admin/user/"); + exit; ?>
\ No newline at end of file diff --git a/actions/admin/user/delete.php b/actions/admin/user/delete.php index c449bfe57..d3a3fd90a 100644 --- a/actions/admin/user/delete.php +++ b/actions/admin/user/delete.php @@ -10,6 +10,8 @@ * @link http://elgg.org/ */ + require_once("../../../engine/start.php"); + // block non-admin users admin_gatekeeper(); @@ -26,4 +28,7 @@ } else system_message(elgg_echo('admin:user:delete:no')); + + header("Location: {$CONFIG->wwwroot}admin/user/"); + exit; ?>
\ No newline at end of file |