fix(emails): dont allow retrieving user data if showemail is false @julianlam

v1.18.x
Barış Soner Uşaklı 4 years ago committed by Julian Lam
parent 6694bdd550
commit 7d115c8ef2

@ -46,6 +46,12 @@ userController.getUserDataByField = async function (callerUid, field, fieldValue
uid = await user.getUidByUsername(fieldValue);
} else if (field === 'email') {
uid = await user.getUidByEmail(fieldValue);
if (uid) {
const settings = await user.getSettings(uid);
if (settings && !settings.showemail) {
uid = 0;
}
}
}
if (!uid) {
return null;

Loading…
Cancel
Save