summaryrefslogtreecommitdiff
path: root/lib/plugins
diff options
context:
space:
mode:
authorMichael Klier <chi@chimeric.de>2008-10-11 15:36:40 +0200
committerMichael Klier <chi@chimeric.de>2008-10-11 15:36:40 +0200
commitc9a8f912634065b1d643022ada92da161e978a56 (patch)
treec6930b09cb3da6c663228b2c3caf60bb93a1c8b4 /lib/plugins
parent70a7f6bad39ac2f2c6a79293948ad39d00676da8 (diff)
downloadrpg-c9a8f912634065b1d643022ada92da161e978a56.tar.gz
rpg-c9a8f912634065b1d643022ada92da161e978a56.tar.bz2
FS#1137 don't allow admin user to delete himself
darcs-hash:20081011133640-23886-b2bc0d25ccc41af3c4c9d1c387eef3efea16689a.gz
Diffstat (limited to 'lib/plugins')
-rw-r--r--lib/plugins/usermanager/admin.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php
index 9f1a200f6..67af14519 100644
--- a/lib/plugins/usermanager/admin.php
+++ b/lib/plugins/usermanager/admin.php
@@ -393,6 +393,11 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
if (!is_array($selected) || empty($selected)) return false;
$selected = array_keys($selected);
+ if(in_array($_SERVER['REMOTE_USER'], $selected)) {
+ msg("You can't delete yourself!", -1);
+ return false;
+ }
+
$count = $this->_auth->triggerUserMod('delete', array($selected));
if ($count == count($selected)) {
$text = str_replace('%d', $count, $this->lang['delete_ok']);