aboutsummaryrefslogtreecommitdiff
path: root/actions/admin/user/ban.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/admin/user/ban.php')
-rw-r--r--actions/admin/user/ban.php15
1 files changed, 9 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