fix: #10805, hide unconfirmed emails from user data retrieval methods

isekai-main
Julian Lam 3 years ago
parent 3e062a7f29
commit cba9047f67

@ -44,6 +44,11 @@ helpers.getUserDataByUserSlug = async function (userslug, callerUID, query = {})
userData = await user.hidePrivateData(userData, callerUID);
userData.emailClass = userSettings.showemail ? 'hide' : '';
// If email unconfirmed, hide from result set
if (!userData['email:confirmed']) {
userData.email = '';
}
if (isAdmin || isSelf || (canViewInfo && !results.isTargetAdmin)) {
userData.ips = results.ips;
}

Loading…
Cancel
Save