@ -316,9 +316,8 @@ class ModelUsers extends RocketChat.models._Base {
setCustomFields(_id, fields) {
const values = {};
Object.keys(fields).reduce(key => {
const value = fields[key];
values[`customFields.${ key }`] = value;
Object.keys(fields).forEach(key => {
values[`customFields.${ key }`] = fields[key];
});
const update = {$set: values};