fixing #1587 properly for profile views

This commit is contained in:
psychobunny
2014-05-28 18:15:53 -04:00
parent 74097be2e4
commit 0334a487b5
3 changed files with 13 additions and 4 deletions

View File

@@ -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);
};