diff options
Diffstat (limited to 'phpBB/includes/acp/acp_users.php')
-rw-r--r-- | phpBB/includes/acp/acp_users.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 7728df6275..6b817235b2 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -708,6 +708,17 @@ class acp_users // Setting a normal member to be a founder if ($data['user_founder'] && $user_row['user_type'] != USER_FOUNDER) { + // Make sure the user is not setting an Inactive or ignored user to be a founder + if ($user_row['user_type'] == USER_IGNORE) + { + trigger_error($user->lang['CANNOT_SET_FOUNDER_BOT'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); + } + + if ($user_row['user_type'] == USER_INACTIVE) + { + trigger_error($user->lang['CANNOT_SET_FOUNDER_INACTIVE'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); + } + $sql_ary['user_type'] = USER_FOUNDER; } else if (!$data['user_founder'] && $user_row['user_type'] == USER_FOUNDER) |