fix(script): better regex anchor

This commit is contained in:
Sabe Jones
2019-08-05 16:20:56 -05:00
parent 8702a28bcc
commit 551cbee92c

View File

@@ -58,7 +58,7 @@ async function _deleteHabiticaData (user, email) {
}
async function _processEmailAddress (email) {
const emailRegex = new RegExp(`^${email}`, 'i');
const emailRegex = new RegExp(`^${email}$`, 'i');
const users = await User.find({
$or: [
{'auth.local.email': emailRegex},