diff options
Diffstat (limited to 'actions/admin/user/removeadmin.php')
-rw-r--r-- | actions/admin/user/removeadmin.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actions/admin/user/removeadmin.php b/actions/admin/user/removeadmin.php index 468670940..97bfc396b 100644 --- a/actions/admin/user/removeadmin.php +++ b/actions/admin/user/removeadmin.php @@ -11,6 +11,11 @@ admin_gatekeeper(); $guid = get_input('guid'); $user = get_entity($guid); +if ($guid == get_loggedin_userid()) { + register_error(elgg_echo('admin:user:self:removeadmin:no')); + forward(REFERER); +} + if (($user instanceof ElggUser) && ($user->canEdit())) { if ($user->removeAdmin()) { system_message(elgg_echo('admin:user:removeadmin:yes')); |