From 04e96902ce77ed39c1a1509d852d6a97af626aec Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 21 Nov 2020 17:14:47 +0000 Subject: [PATCH] fixed account verification notice duplicating --- src/js/account.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/js/account.js b/src/js/account.js index 237f7bd8a..1eb1eb939 100644 --- a/src/js/account.js +++ b/src/js/account.js @@ -232,24 +232,13 @@ function signOut() { }); } -function sendVerificationEmail() { - let cu = firebase.auth().currentUser; - cu.sendEmailVerification() - .then((e) => { - showNotification("Email sent to " + cu.email, 4000); - }) - .catch((e) => { - showNotification("Error: " + e.message, 3000); - console.error(e.message); - }); -} - firebase.auth().onAuthStateChanged(function (user) { if (user) { // User is signed in. + $(".pageAccount .content p.accountVerificatinNotice").remove(); if (user.emailVerified === false) { $(".pageAccount .content").prepend( - `

Your account is not verified. Click here to resend the verification email.` + `

Your account is not verified. Click here to resend the verification email.` ); } updateAccountLoginButton();