diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-13 15:28:45 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-13 15:28:45 +0000 |
commit | cc1d7f7a798f9451dfb3a224df3a871e59a060d5 (patch) | |
tree | 7ebea9743650dbf2666f804cb17cbf6d8ab72f49 /actions/admin | |
parent | 9a0d66f6b02e8ef63051372b7ed64b5e3019a7b3 (diff) | |
download | elgg-cc1d7f7a798f9451dfb3a224df3a871e59a060d5.tar.gz elgg-cc1d7f7a798f9451dfb3a224df3a871e59a060d5.tar.bz2 |
ASSIGNED - # 2: Administration panel
http://trac.elgg.org/elgg/ticket/2
- Added ban template and delete
git-svn-id: https://code.elgg.org/elgg/trunk@913 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions/admin')
-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 |