diff --git a/src/app/settings/premium.component.ts b/src/app/settings/premium.component.ts index 5e7975d2..4903d10c 100644 --- a/src/app/settings/premium.component.ts +++ b/src/app/settings/premium.component.ts @@ -61,6 +61,12 @@ export class PremiumComponent implements OnInit { try { if (this.selfHosted) { + if (!this.tokenService.getEmailVerified()) { + this.toasterService.popAsync('error', this.i18nService.t('errorOccurred'), + this.i18nService.t('verifyEmailFirst')); + return; + } + const fd = new FormData(); fd.append('license', files[0]); this.formPromise = this.apiService.postAccountLicense(fd).then(() => { diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json index 38654327..d5524bcd 100644 --- a/src/locales/en/messages.json +++ b/src/locales/en/messages.json @@ -2106,6 +2106,9 @@ "verifyEmailDesc": { "message": "Verify your account's email address to unlock access to all features." }, + "verifyEmailFirst": { + "message": "Your account's email address first must be verified." + }, "checkInboxForVerification": { "message": "Check your email inbox for a verification link." },