Merge branch 'master' into recaptcha-support

This commit is contained in:
riley
2017-03-20 07:36:20 -07:00
committed by gaba
128 changed files with 2665 additions and 732 deletions
+16
View File
@@ -446,6 +446,22 @@ module.exports = class UsersService {
});
}
/**
* Suspend a user. It changes the status to BANNED and canEditName to True.
* @param {String} id id of a user
* @param {Function} done callback after the operation is complete
*/
static suspendUser(id) {
return UserModel.update({
id
}, {
$set: {
status: 'BANNED',
canEditName: true
}
});
}
/**
* Finds a user with the id.
* @param {String} id user id (uuid)