README
sitegate-user
Methods
getById(id, callback)
Usage
User.getById('550b42003376b4ec12fbbcb1', function(err, user) {
console.log(user.name);
});
Arguments
Name | Type | Description |
---|---|---|
id | string |
The ID of the user. |
[options] | object |
A hash with options.
Where
|
cb | function(err, user) |
A callback function to receive the user. |
update(id, updatedFields, [callback])
Usage
User.update('550b42003376b4ec12fbbcb1', {
name: 'New name'
}, function (err, user) {
console.log(user.name);
});
Arguments
Name | Type | Description |
---|---|---|
id | string | The ID of the user that has to be updated. |
updatedFields | object | A hash of the fields that have to be updated with the new values. |
cb | function(err, user) | A callback function to receive the updated user. |
License
The MIT License (MIT)