From c8e64ae93b99535c5212f372f248b6bc18af4a1b Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 11 Jul 2016 18:26:04 -0400 Subject: [PATCH] updating profile fields to allow plugins (e.g. the write-api) to change a user's profile picture @barisusakli please let me know if this is not ok. --- src/emailer.js | 1 + src/user/profile.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/emailer.js b/src/emailer.js index e297985572..27c64c4986 100644 --- a/src/emailer.js +++ b/src/emailer.js @@ -90,6 +90,7 @@ var fallbackTransport; }, function (results, next) { var data = { + _raw: params, to: email, from: meta.config['email:from'] || 'no-reply@' + getHostname(), from_name: meta.config['email:from_name'] || 'NodeBB', diff --git a/src/user/profile.js b/src/user/profile.js index 631d8d8f09..8b2a83f152 100644 --- a/src/user/profile.js +++ b/src/user/profile.js @@ -13,7 +13,7 @@ var plugins = require('../plugins'); module.exports = function(User) { User.updateProfile = function(uid, data, callback) { - var fields = ['username', 'email', 'fullname', 'website', 'location', 'groupTitle', 'birthday', 'signature', 'aboutme']; + var fields = ['username', 'email', 'fullname', 'website', 'location', 'groupTitle', 'birthday', 'signature', 'aboutme', 'picture', 'uploadedpicture']; plugins.fireHook('filter:user.updateProfile', {uid: uid, data: data, fields: fields}, function(err, data) { if (err) {