mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
feat: also pass in uid to filter:email.prepare
This commit is contained in:
@@ -217,7 +217,7 @@ Emailer.send = async (template, uid, params) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let userData = await User.getUserFields(uid, ['email', 'username', 'email:confirmed']);
|
let userData = await User.getUserFields(uid, ['email', 'username', 'email:confirmed']);
|
||||||
({ template, userData, params } = await Plugins.hooks.fire('filter:email.prepare', { template, userData, params }));
|
({ template, userData, params } = await Plugins.hooks.fire('filter:email.prepare', { template, uid, userData, params }));
|
||||||
if (!userData || !userData.email) {
|
if (!userData || !userData.email) {
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
winston.warn(`uid : ${uid} has no email, not sending "${template}" email.`);
|
winston.warn(`uid : ${uid} has no email, not sending "${template}" email.`);
|
||||||
|
|||||||
Reference in New Issue
Block a user