Browse Source

Fix signup email verification

Chocobozzz 5 years ago
parent
commit
d1ea2a988d

+ 3 - 3
client/src/app/+signup/+verify-account/verify-account-email/verify-account-email.component.ts

@@ -33,8 +33,6 @@ export class VerifyAccountEmailComponent implements OnInit {
     this.verificationString = queryParams['verificationString']
     this.isPendingEmail = queryParams['isPendingEmail'] === 'true'
 
-    console.log(this.isPendingEmail)
-
     if (!this.userId || !this.verificationString) {
       this.notifier.error(this.i18n('Unable to find user id or verification string.'))
     } else {
@@ -46,7 +44,9 @@ export class VerifyAccountEmailComponent implements OnInit {
     this.userService.verifyEmail(this.userId, this.verificationString, this.isPendingEmail)
       .subscribe(
         () => {
-          this.authService.refreshUserInformation()
+          if (this.authService.isLoggedIn()) {
+            this.authService.refreshUserInformation()
+          }
 
           this.success = true
         },