diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-18 18:33:34 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-18 18:33:34 +0000 |
commit | a33fdc7d15a9c8edd3fcff736a23857f4b1e0885 (patch) | |
tree | 707bb6f2b2a1f319d9dc78e6ac25f3c5b70843c4 /actions | |
parent | 9d4db97e2750a4fb0fecb839f5d1939433654c3f (diff) | |
download | elgg-a33fdc7d15a9c8edd3fcff736a23857f4b1e0885.tar.gz elgg-a33fdc7d15a9c8edd3fcff736a23857f4b1e0885.tar.bz2 |
Fixes #15: Ban user functionality
git-svn-id: https://code.elgg.org/elgg/trunk@981 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions')
-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 |