Skip to content

Commit

Permalink
Update forgotpassword.js
Browse files Browse the repository at this point in the history
  • Loading branch information
camillereaves authored Sep 25, 2023
1 parent 994ac81 commit 4d659cf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions public/forgotpassword.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ async function validateNewPassword(password, user){
return true;
}

async function fetchUser(username){
async function fetchUser(username, userEmail){
try{
var userData = [];
username = username.toString();
userEmail = userEmail.toString();
const q = query(users, where('username', '==', username));
const getUsers = await getDocs(q).then((querySnapshot) => {
const tempDoc = [];
Expand All @@ -82,7 +83,8 @@ async function fetchUser(username){
return false;
}
} catch(error) {
console.log(error)
console.log(error);
alert("Please enter the correct username and e-mail associated with the account before proceeding.");
}
return false;
}
Expand Down

0 comments on commit 4d659cf

Please sign in to comment.