Fix signup email verification
authorChocobozzz <me@florianbigard.com>
Thu, 20 Jun 2019 15:25:53 +0000 (17:25 +0200)
committerChocobozzz <me@florianbigard.com>
Thu, 20 Jun 2019 15:25:53 +0000 (17:25 +0200)
client/src/app/+signup/+verify-account/verify-account-email/verify-account-email.component.ts

index 054f04310b38bf0bea31fbae8b7b3a06b16ac9ab..48ddd71305a970a993c8c34aded4aa1c7672452d 100644 (file)
@@ -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
         },