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.
v1.18.x
Julian Lam 9 years ago
parent 1f5913c874
commit c8e64ae93b

@ -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',

@ -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) {

Loading…
Cancel
Save