Finish unit tests for all server services
This commit is contained in:
parent
3add44d342
commit
acbc52506c
21 changed files with 1609 additions and 206 deletions
|
@ -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 a new issue