return user object

v1.18.x
barisusakli 11 years ago
parent b4b9ed1841
commit ec86aafb48

@ -370,9 +370,12 @@ var async = require('async'),
userData = {}; userData = {};
} }
topic.username = userData.username || 'Anonymous'; topic.user = {
topic.userslug = userData.userslug || ''; username: userData.username || 'Anonymous',
topic.picture = userData.picture || gravatar.url('', {}, true); userslug: userData.userslug || '',
picture: userData.picture || gravatar.url('', {}, true)
};
callback(null, topic); callback(null, topic);
}); });
}); });
@ -709,7 +712,7 @@ var async = require('async'),
}, },
privileges: function(next) { privileges: function(next) {
if (privilegeCache[topicData.cid]) { if (privilegeCache[topicData.cid]) {
return next(null, privilegeCache[topicData.cid]) return next(null, privilegeCache[topicData.cid]);
} }
categoryTools.privileges(topicData.cid, uid, next); categoryTools.privileges(topicData.cid, uid, next);
}, },

Loading…
Cancel
Save