Fixes to character name validation

Admin should be able to create any name
Also fixes to config.character_name_min_length being ignored
This commit is contained in:
slawkens
2021-01-20 18:02:07 +01:00
parent 8b41e144f8
commit 81b293a5a6
4 changed files with 32 additions and 14 deletions

View File

@@ -15,6 +15,10 @@ $character_sex = isset($_POST['sex']) ? (int)$_POST['sex'] : null;
$character_vocation = isset($_POST['vocation']) ? (int)$_POST['vocation'] : null;
$character_town = isset($_POST['town']) ? (int)$_POST['town'] : null;
if (!admin() && !empty($character_name)) {
$character_name = ucwords(strtolower($character_name));
}
$character_created = false;
$save = isset($_POST['save']) && $_POST['save'] == 1;
$errors = array();