fix(emails): don't automatically associate email during user creation if passed in at registration

v1.18.x
Julian Lam 4 years ago
parent f52919990b
commit e726048e0c

@ -93,12 +93,6 @@ module.exports = function (User) {
['users:reputation', 0, userData.uid],
];
if (userData.email) {
bulkAdd.push(['email:uid', userData.uid, userData.email.toLowerCase()]);
bulkAdd.push(['email:sorted', 0, `${userData.email.toLowerCase()}:${userData.uid}`]);
bulkAdd.push([`user:${userData.uid}:emails`, timestamp, `${userData.email}:${timestamp}`]);
}
if (userData.fullname) {
bulkAdd.push(['fullname:sorted', 0, `${userData.fullname.toLowerCase()}:${userData.uid}`]);
}

Loading…
Cancel
Save