protected function isValidUsername($name)
    {
        if (!is_string($name)
            || !$this->storage->checkValidName($name)
            || strlen($name) < $this->config["registration"]["nameLenMin"]
            || strlen($name) > $this->config["registration"]["nameLenMax"]
        ) {
            return false;
        }
        return true;
    }