From 42ec373c5fc45a42fa3f236c41aec767b083f60b Mon Sep 17 00:00:00 2001 From: dignajar Date: Wed, 22 Jul 2015 22:45:54 -0300 Subject: [PATCH] User delete functionality --- admin/controllers/edit-user.php | 5 +++++ admin/themes/default/index.php | 12 ++++++------ admin/views/edit-user.php | 8 +++++++- kernel/abstract/plugin.class.php | 14 ++++++++++++-- kernel/boot/rules/80.plugins.php | 10 ++++++---- themes/pure/index.php | 5 ++++- 6 files changed, 40 insertions(+), 14 deletions(-) diff --git a/admin/controllers/edit-user.php b/admin/controllers/edit-user.php index 3dc6b563..5032a597 100644 --- a/admin/controllers/edit-user.php +++ b/admin/controllers/edit-user.php @@ -43,6 +43,11 @@ function deleteUser($args, $deleteContent=false) global $dbPosts; global $Language; + // The user admin cannot be deleted. + if($args['username']=='admin') { + return false; + } + if($deleteContent) { $dbPosts->deletePostsByUser($args['username']); } diff --git a/admin/themes/default/index.php b/admin/themes/default/index.php index 06b23a0c..85316ab8 100644 --- a/admin/themes/default/index.php +++ b/admin/themes/default/index.php @@ -15,12 +15,14 @@ - + + + + +