public function register()
    {
        if ($this->validate()) {
            $class = $this->userClass;
            $user = new $class(['password' => $this->password]);
            /* @var $user User */
            $profile = $user->createProfile(['nickname' => $this->nickname, 'first_name' => $this->first_name, 'last_name' => $this->last_name, 'gender' => $this->gender]);
            $models[] = $profile;
            if (is_string($this->username)) {
                $username = $user->createUsername($this->username);
                $models[] = $username;
            }
            $result = $user->register($models);
            if ($result == true) {
                $this->model = $user;
            }
            return $result;
        }
        return false;
    }