Skip to content

Commit

Permalink
removing additional socket methods added via #4304
Browse files Browse the repository at this point in the history
@barisusakli added these methods in 8d9f7d8
  • Loading branch information
julianlam committed Mar 18, 2016
1 parent 3d815ff commit 1736b1c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 42 deletions.
2 changes: 1 addition & 1 deletion public/src/client/groups/details.js
Expand Up @@ -259,4 +259,4 @@ define('forum/groups/details', [
}

return Details;
});
});
41 changes: 0 additions & 41 deletions src/socket.io/user.js
Expand Up @@ -350,45 +350,4 @@ SocketUser.getUserByEmail = function(socket, email, callback) {
};


SocketUser.getUserByUID = getUserByUID;

function getUserByUID(socket, uid, callback) {
async.parallel({
userData: async.apply(user.getUserData, uid),
settings: async.apply(user.getSettings, uid)
}, function(err, results) {
if (err || !results.userData) {
return callback(err||new Error('[[error:no-user]]'));
}

results.userData.email = results.settings.showemail ? results.userData.email : undefined;
results.userData.fullname = results.settings.showfullname ? results.userData.fullname : undefined;

callback(null,results.userData);
});
}

SocketUser.getUserByUsername = function(socket, username, callback) {
async.waterfall([
function(next) {
user.getUidByUsername(username || 0, next);
},
function(uid, next) {
getUserByUID(socket, uid, next);
}
], callback);
};

SocketUser.getUserByEmail = function(socket, email, callback) {

async.waterfall([
function(next) {
user.getUidByEmail(email || 0, next);
},
function(uid, next) {
getUserByUID(socket, uid, next);
}
], callback);
};

module.exports = SocketUser;

0 comments on commit 1736b1c

Please sign in to comment.