public function createSubUser($userName, $email, $newPassword, $twoFactorType, $roles) { if (!$this->validated) { $this->userID = AuthUserData::addSubNewUser($userName, $email, $this->parentUserID); AuthUserData::confirmEmail(AuthUserData::getUserIDByUserName($userName)); $this->validated = true; $this->updateSubUserPassword($newPassword); $this->updateSubUser($twoFactorType, $roles); return $this->userID; } return false; }