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.php18
1 files changed, 7 insertions, 11 deletions
diff --git a/actions/admin/user/ban.php b/actions/admin/user/ban.php
index 1a5d9e4a9..6622673e6 100644
--- a/actions/admin/user/ban.php
+++ b/actions/admin/user/ban.php
@@ -1,23 +1,20 @@
<?php
/**
- * Elgg ban user
+ * Bans a user.
*
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
+ * User entities are banned by setting the 'banned' column
+ * to 'yes' in the users_entity table.
+ *
+ * @package Elgg.Core
+ * @subpackage Administration.User
*/
-
-// block non-admin users
admin_gatekeeper();
-// Get the user
$guid = get_input('guid');
$obj = get_entity($guid);
if (($obj instanceof ElggUser) && ($obj->canEdit())) {
- // Now actually disable it
if ($obj->ban('banned')) {
system_message(elgg_echo('admin:user:ban:yes'));
} else {
@@ -27,5 +24,4 @@ if (($obj instanceof ElggUser) && ($obj->canEdit())) {
register_error(elgg_echo('admin:user:ban:no'));
}
-forward('pg/admin/user/');
-exit;
+forward('pg/admin/user/'); \ No newline at end of file