make emails lowercase
This commit is contained in:
@@ -479,7 +479,7 @@ api.updateHero = {
|
||||
}
|
||||
|
||||
if (updateData.auth.local && updateData.auth.local.email) {
|
||||
hero.auth.local.email = updateData.auth.local.email;
|
||||
hero.auth.local.email = updateData.auth.local.email.toLowerCase();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ export async function socialEmailToLocal (user) {
|
||||
{ 'auth.local.email': socialEmail },
|
||||
{ _id: 1 },
|
||||
).exec();
|
||||
if (!conflictingUser) return socialEmail;
|
||||
if (!conflictingUser) return socialEmail.toLowerCase();
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user