generators/app/templates/server/api/user(auth)/user.socket(socketio).js
function registerUserSockets(socket) {
  User.schema.post('save', function (doc) {
    onSave(socket, doc);
  });

  User.schema.post('remove', function (doc) {
    onRemove(socket, doc);
  });
}
function registerUserSockets(socket) {
  User.schema.post('save', function (doc) {
    onSave(socket, doc);
  });

  User.schema.post('remove', function (doc) {
    onRemove(socket, doc);
  });
}
function registerUserSockets ( socket ) { User . schema . post ( 'save' , function ( doc ) { onSave ( socket , doc ) ; } ) ; User . schema . post ( 'remove' , function ( doc ) { onRemove ( socket , doc ) ; } ) ; }
Register User model change events on the passed socket
@param {socket.io} socket - The socket object to register the User model events on
Register User model change events on the passed socket