summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/users.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/models/users.js b/models/users.js
index 11a53ce6..92cee9f6 100644
--- a/models/users.js
+++ b/models/users.js
@@ -372,6 +372,13 @@ Meteor.methods({
Meteor.call('setUsername', username, userId);
Meteor.call('setEmail', email, userId);
},
+ setPassword(newPassword, userId) {
+ check(userId, String);
+ check(newPassword, String);
+ if(Meteor.user().isAdmin){
+ Accounts.setPassword(userId, newPassword);
+ }
+ },
});
if (Meteor.isServer) {