Added referenceId to register component

This commit is contained in:
Chad Scharf 2020-06-25 15:18:21 -04:00
parent 87973e9775
commit 03dbe272fc
1 changed files with 9 additions and 0 deletions

View File

@ -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() {