mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 06:13:45 +02:00
Finish unit tests for all server services
This commit is contained in:
@@ -47,7 +47,7 @@ class UsernameGenerationService
|
||||
}
|
||||
|
||||
// Filter the Server Name
|
||||
$name = trim(preg_replace('/[^\w]+/', '', $name), '_');
|
||||
$name = trim(preg_replace('/[^A-Za-z0-9]+/', '', $name), '_');
|
||||
$name = (strlen($name) < 1) ? str_random(6) : $name;
|
||||
|
||||
return strtolower(substr($name, 0, 6) . '_' . $unique);
|
||||
|
||||
Reference in New Issue
Block a user