mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 09:44:55 +02:00
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:
@@ -35,6 +35,13 @@ class CreateCharacter
|
||||
}
|
||||
}
|
||||
|
||||
$player = new OTS_Player();
|
||||
$player->find($name);
|
||||
if($player->isLoaded()) {
|
||||
$errors['name'] = 'Character with this name already exist.';
|
||||
return false;
|
||||
}
|
||||
|
||||
if(empty($sex) && $sex != "0")
|
||||
$errors['sex'] = 'Please select the sex for your character!';
|
||||
|
||||
@@ -214,4 +221,4 @@ class CreateCharacter
|
||||
$account->logAction('Created character <b>' . $name . '</b>.');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user