mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
fixing #1587 properly for profile views
This commit is contained in:
@@ -24,6 +24,14 @@ SocketUser.emailExists = function(socket, data, callback) {
|
||||
}
|
||||
};
|
||||
|
||||
SocketUser.increaseViewCount = function(socket, uid, callback) {
|
||||
if (uid) {
|
||||
if (socket.uid !== parseInt(uid, 10)) {
|
||||
user.incrementUserFieldBy(uid, 'profileviews', 1);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
SocketUser.search = function(socket, username, callback) {
|
||||
user.search(username, callback);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user