From 03dbe272fc6da7eb0425a296c584578da374b8e6 Mon Sep 17 00:00:00 2001 From: Chad Scharf <3904944+cscharf@users.noreply.github.com> Date: Thu, 25 Jun 2020 15:18:21 -0400 Subject: [PATCH] Added referenceId to register component --- src/app/accounts/register.component.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/app/accounts/register.component.ts b/src/app/accounts/register.component.ts index 22815af339..a617bf8c8e 100644 --- a/src/app/accounts/register.component.ts +++ b/src/app/accounts/register.component.ts @@ -77,6 +77,9 @@ export class RegisterComponent extends BaseRegisterComponent { if (qParams.layout != null) { this.layout = qParams.layout; } + if (qParams.reference != null) { + this.referenceId = qParams.reference; + } if (queryParamsSub != null) { queryParamsSub.unsubscribe(); } @@ -96,6 +99,12 @@ export class RegisterComponent extends BaseRegisterComponent { if (this.policies != null) { this.enforcedPolicyOptions = await this.policyService.getMasterPasswordPolicyOptions(this.policies); } + + const referenceId = ('; ' + document.cookie).split('; reference=').pop().split(';').shift(); + this.referenceId = this.referenceId || referenceId; + if (this.referenceId === '') { + this.referenceId = null; + } } async submit() {