diff options
Diffstat (limited to 'actions')
-rw-r--r-- | actions/admin/user/ban.php | 31 | ||||
-rw-r--r-- | actions/admin/user/delete.php | 29 |
2 files changed, 60 insertions, 0 deletions
diff --git a/actions/admin/user/ban.php b/actions/admin/user/ban.php new file mode 100644 index 000000000..188ab9c7a --- /dev/null +++ b/actions/admin/user/ban.php @@ -0,0 +1,31 @@ +<?php + /** + * Elgg ban user + * + * @package Elgg + * @subpackage Core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Marcus Povey + * @copyright Curverider Ltd 2008 + * @link http://elgg.org/ + */ + + // block non-admin users + admin_gatekeeper(); + + // Get the user + $guid = get_input('guid'); + $obj = get_entity($guid); + + if ( ($obj instanceof ElggUser) && ($obj->canEdit())) + { + + // TODO: Ban user + + + + + } + else + system_message(elgg_echo('admin:user:ban:no')); +?>
\ No newline at end of file diff --git a/actions/admin/user/delete.php b/actions/admin/user/delete.php new file mode 100644 index 000000000..c449bfe57 --- /dev/null +++ b/actions/admin/user/delete.php @@ -0,0 +1,29 @@ +<?php + /** + * Elgg delete user + * + * @package Elgg + * @subpackage Core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Marcus Povey + * @copyright Curverider Ltd 2008 + * @link http://elgg.org/ + */ + + // block non-admin users + admin_gatekeeper(); + + // Get the user + $guid = get_input('guid'); + $obj = get_entity($guid); + + if ( ($obj instanceof ElggUser) && ($obj->canEdit())) + { + if (delete_entity($guid)) + system_message(elgg_echo('admin:user:delete:yes')); + else + system_message(elgg_echo('admin:user:delete:no')); + } + else + system_message(elgg_echo('admin:user:delete:no')); +?>
\ No newline at end of file |