Skip to content
Snippets Groups Projects
Commit 3d390466 authored by Gabriel Engel's avatar Gabriel Engel Committed by GitHub
Browse files

Merge pull request #5360 from konstantintrushin/patch-1

Update users.js
parents c5139f6d dc639ce1
No related branches found
No related tags found
No related merge requests found
...@@ -26,9 +26,9 @@ RocketChat.API.v1.addRoute('users.create', { authRequired: true }, { ...@@ -26,9 +26,9 @@ RocketChat.API.v1.addRoute('users.create', { authRequired: true }, {
RocketChat.saveCustomFields(newUserId, this.bodyParams.customFields); RocketChat.saveCustomFields(newUserId, this.bodyParams.customFields);
} }
if (this.bodyParams.active === false) { if (typeof this.bodyParams.active !== 'undefined') {
Meteor.runAsUser(this.userId, () => { Meteor.runAsUser(this.userId, () => {
Meteor.call('setUserActiveStatus', newUserId, false); Meteor.call('setUserActiveStatus', newUserId, this.bodyParams.active);
}); });
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment