protected virtual void Start() { Service.Get <ICPSwrveService>().Funnel(Service.Get <MembershipService>().AccountFunnelName, "03", "create"); createController = GetComponentInParent <AbstractCreateController>(); createController.OnCreateError += onCreateError; createController.CanShowAccountError = true; createController.CheckRegConfigReady(); }
private void Start() { Service.Get <ICPSwrveService>().Funnel(Service.Get <MembershipService>().AccountFunnelName, "05", "display_name"); createController = GetComponentInParent <AbstractCreateController>(); createController.OnUpdateDisplayNameError += OnUpdateDisplayNameError; referAFriendEnabled = true; if (Service.Get <SessionManager>().LocalUser != null && (Service.Get <SessionManager>().LocalUser.RegistrationProfile.DisplayNameProposedStatus == DisplayNameProposedStatus.Rejected || (Service.Get <SessionManager>().LocalUser.RegistrationProfile.DisplayNameProposedStatus == DisplayNameProposedStatus.Pending && Service.Get <SessionManager>().LocalUser.RegistrationProfile.ProposedDisplayName.StartsWith("DNAME-REJ-")))) { Instructions.text = Service.Get <Localizer>().GetTokenTranslation("Account.DisplayName.DisplayNameRejected"); referAFriendEnabled = false; } if (ReferAFriendSection != null) { ReferAFriendSection.SetActive(referAFriendEnabled); } else { referAFriendEnabled = false; } setDisplayNameValid = false; AccountFlowData accountFlowData = Service.Get <MembershipService>().GetAccountFlowData(); SessionManager sessionManager = Service.Get <SessionManager>(); if (!string.IsNullOrEmpty(sessionManager.LocalUser.RegistrationProfile.Username) && accountFlowData.PreValidatedDisplayNames.Contains(sessionManager.LocalUser.RegistrationProfile.Username)) { DisplayNameInputField.TextInput.text = sessionManager.LocalUser.RegistrationProfile.Username; DisplayNameInputField.HasError = false; DisplayNameInputField.IsValidationComplete = true; setDisplayNameValid = true; } AvatarRenderTextureComponent componentInChildren = GetComponentInChildren <AvatarRenderTextureComponent>(); CPDataEntityCollection cPDataEntityCollection = Service.Get <CPDataEntityCollection>(); DataEntityHandle localPlayerHandle = cPDataEntityCollection.LocalPlayerHandle; if (!localPlayerHandle.IsNull && cPDataEntityCollection.TryGetComponent <AvatarDetailsData>(localPlayerHandle, out var component)) { componentInChildren.RenderAvatar(component); } else { componentInChildren.RenderAvatar(new DCustomEquipment[0]); } }
private void Start() { popupAnchors = GetComponentInParent <AccountPopupContentAnchors>(); popupAnchors.VerticalAlign = AccountPopupContentAnchors.VerticalAlignment.Bottom; createController = GetComponentInParent <AbstractCreateController>(); createController.OnProfileUpdateError += onProfileUpdateError; sessionManager = Service.Get <SessionManager>(); Localizer localizer = Service.Get <Localizer>(); string text = ""; string text2 = ""; string text3 = ""; if (WhichFields == FormType.LegalUpdate) { createController.CanShowAccountError = true; text2 = "legal_update"; text3 = "14"; SetLegalUpdate(); TitleText.text = string.Format(localizer.GetTokenTranslation("Account.Login.PPU.LegalUpdate"), sessionManager.LocalUser.DisplayName.Text); LegalPanel.gameObject.SetActive(isLegalTextDisplayed); } else { createController.CanShowAccountError = false; text2 = "profile_update"; text3 = "13"; SetMissingInfo(); TitleText.text = string.Format(localizer.GetTokenTranslation("Account.Login.PPU.MissingInfo.TitleText"), sessionManager.LocalUser.DisplayName.Text); text = localizer.GetTokenTranslation("Account.Login.PPU.MissingInfo.Instructions"); ParentEmailInputField.gameObject.SetActive(isParentEmailFieldDisplayed); FirstNameInputField.gameObject.SetActive(isFirstNameFieldDisplayed); if (isParentEmailFieldDisplayed) { text = text + "\n" + localizer.GetTokenTranslation("Account.Login.PPU.MissingInfo.ParentEmailField"); } if (isFirstNameFieldDisplayed) { text = text + "\n" + localizer.GetTokenTranslation("Account.Login.PPU.MissingInfo.FirstNameField"); } InstructionText.text = text; } Service.Get <ICPSwrveService>().Funnel(Service.Get <MembershipService>().AccountFunnelName, text3, text2); }