mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 06:07:21 +01:00
fix(script): better regex anchor
This commit is contained in:
@@ -58,7 +58,7 @@ async function _deleteHabiticaData (user, email) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function _processEmailAddress (email) {
|
async function _processEmailAddress (email) {
|
||||||
const emailRegex = new RegExp(`^${email}`, 'i');
|
const emailRegex = new RegExp(`^${email}$`, 'i');
|
||||||
const users = await User.find({
|
const users = await User.find({
|
||||||
$or: [
|
$or: [
|
||||||
{'auth.local.email': emailRegex},
|
{'auth.local.email': emailRegex},
|
||||||
|
|||||||
Reference in New Issue
Block a user