diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-10-14 19:40:21 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-10-14 19:40:21 +0000 |
commit | 48486e99479657edb70474ae9b18dbe713e1cae0 (patch) | |
tree | b6ae3258c6b87a1086d124661b98ef6fb1e2199c /actions/admin/user/unban.php | |
parent | ee554433ea345fe1037e7ace1f2d82bd49e53cae (diff) | |
download | elgg-48486e99479657edb70474ae9b18dbe713e1cae0.tar.gz elgg-48486e99479657edb70474ae9b18dbe713e1cae0.tar.bz2 |
Standardized actions/admin/*
git-svn-id: http://code.elgg.org/elgg/trunk@3540 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions/admin/user/unban.php')
-rw-r--r-- | actions/admin/user/unban.php | 71 |
1 files changed, 35 insertions, 36 deletions
diff --git a/actions/admin/user/unban.php b/actions/admin/user/unban.php index 64ba3516c..f78d291c5 100644 --- a/actions/admin/user/unban.php +++ b/actions/admin/user/unban.php @@ -1,39 +1,38 @@ <?php - /** - * Elgg ban user - * - * @package Elgg - * @subpackage Core - * @author Curverider Ltd - * @link http://elgg.org/ - */ +/** + * Elgg ban user + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + */ - require_once(dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php"); - - // block non-admin users - admin_gatekeeper(); - action_gatekeeper(); - - $access_status = access_get_show_hidden_status(); - access_show_hidden_entities(true); - - // Get the user - $guid = get_input('guid'); - $obj = get_entity($guid); - - if ( ($obj instanceof ElggUser) && ($obj->canEdit())) - { - // Now actually disable it - if ($obj->unban()) - system_message(elgg_echo('admin:user:unban:yes')); - else - register_error(elgg_echo('admin:user:unban:no')); - } - else +require_once(dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php"); + +// block non-admin users +admin_gatekeeper(); +action_gatekeeper(); + +$access_status = access_get_show_hidden_status(); +access_show_hidden_entities(true); + +// Get the user +$guid = get_input('guid'); +$obj = get_entity($guid); + +if (($obj instanceof ElggUser) && ($obj->canEdit())) { + // Now actually disable it + if ($obj->unban()) { + system_message(elgg_echo('admin:user:unban:yes')); + } else { register_error(elgg_echo('admin:user:unban:no')); - - access_show_hidden_entities($access_status); - - forward($_SERVER['HTTP_REFERER']); - exit; -?>
\ No newline at end of file + } +} else { + register_error(elgg_echo('admin:user:unban:no')); +} + +access_show_hidden_entities($access_status); + +forward($_SERVER['HTTP_REFERER']); +exit;
\ No newline at end of file |