mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 06:55:46 +01:00
closes #1482
removed updateHeader, the header is using template values in from the api, update menu partial in vanilla theme as well
This commit is contained in:
@@ -44,37 +44,6 @@ SocketMeta.buildTitle = function(socket, text, callback) {
|
||||
}
|
||||
};
|
||||
|
||||
SocketMeta.updateHeader = function(socket, data, callback) {
|
||||
if(!data) {
|
||||
return callback(new Error('[[error:invalid-data]]'));
|
||||
}
|
||||
|
||||
if (socket.uid) {
|
||||
user.getUserFields(socket.uid, data.fields, function(err, fields) {
|
||||
if(err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
if (fields) {
|
||||
fields.uid = socket.uid;
|
||||
callback(null, fields);
|
||||
} else {
|
||||
callback(null, []);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
callback(null, {
|
||||
uid: 0,
|
||||
username: '[[global:guest]]',
|
||||
email: '',
|
||||
picture: user.createGravatarURLFromEmail(''),
|
||||
config: {
|
||||
allowGuestSearching: meta.config.allowGuestSearching
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
SocketMeta.getUsageStats = function(socket, data, callback) {
|
||||
module.parent.exports.emitTopicPostStats(callback);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user