mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 07:25:46 +01:00
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.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user