mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 21:27:23 +01:00
Revert "Prerequisites to removing Facebook authentication (#13683)"
This reverts commit 1177ad8b8c.
This commit is contained in:
@@ -341,14 +341,7 @@ api.resetPassword = {
|
||||
if (validationErrors) throw validationErrors;
|
||||
|
||||
const email = req.body.email.toLowerCase();
|
||||
const user = await User.findOne({
|
||||
$or: [
|
||||
{ 'auth.local.email': email },
|
||||
{ 'auth.apple.emails.value': email },
|
||||
{ 'auth.google.emails.value': email },
|
||||
{ 'auth.facebook.emails.value': email },
|
||||
],
|
||||
}).exec();
|
||||
const user = await User.findOne({ 'auth.local.email': email }).exec();
|
||||
|
||||
if (user) {
|
||||
// create an encrypted link to be used to reset the password
|
||||
|
||||
Reference in New Issue
Block a user