mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 16:05:49 +01:00
removed unnecessary conditionals from app.updateHeader
This commit is contained in:
@@ -510,19 +510,17 @@ var socket,
|
|||||||
|
|
||||||
var userLabel = loggedInMenu.find('#user_label');
|
var userLabel = loggedInMenu.find('#user_label');
|
||||||
|
|
||||||
if (userLabel.length) {
|
if (data.userslug) {
|
||||||
if (data.userslug) {
|
userLabel.find('#user-profile-link').attr('href', RELATIVE_PATH + '/user/' + data.userslug);
|
||||||
userLabel.find('#user-profile-link').attr('href', RELATIVE_PATH + '/user/' + data.userslug);
|
|
||||||
}
|
|
||||||
if (data.picture) {
|
|
||||||
userLabel.find('img').attr('src', data.picture);
|
|
||||||
}
|
|
||||||
if (data.username) {
|
|
||||||
userLabel.find('#user-profile-link>span').html(' ' + data.username);
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#logout-link').on('click', app.logout);
|
|
||||||
}
|
}
|
||||||
|
if (data.picture) {
|
||||||
|
userLabel.find('img').attr('src', data.picture);
|
||||||
|
}
|
||||||
|
if (data.username) {
|
||||||
|
userLabel.find('#user-profile-link>span').html(' ' + data.username);
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#logout-link').on('click', app.logout);
|
||||||
|
|
||||||
updateOnlineStatus(data.uid);
|
updateOnlineStatus(data.uid);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user