Let admins bypass character list count restriction

This commit is contained in:
Znote 2021-12-16 23:18:56 +01:00
parent 47bbee9acf
commit 88a13e6d10

View File

@ -67,7 +67,7 @@ if (empty($_POST) === false) {
} }
// Char count // Char count
$char_count = user_character_list_count($session_user_id); $char_count = user_character_list_count($session_user_id);
if ($char_count >= $config['max_characters']) { if ($char_count >= $config['max_characters'] && !is_admin($user_data)) {
$errors[] = 'Your account is not allowed to have more than '. $config['max_characters'] .' characters.'; $errors[] = 'Your account is not allowed to have more than '. $config['max_characters'] .' characters.';
} }
if (validate_ip(getIP()) === false && $config['validate_IP'] === true) { if (validate_ip(getIP()) === false && $config['validate_IP'] === true) {