在我的 Meteor 应用程序中,我想更改另一个用户的密码。我想知道是否有任何方法可以在更改之前获取旧密码。
这是我的服务器端方法:
updateuser(id,password, options) {
try {
Meteor.users.update({ _id: id }, { $set: options })
Accounts.setPassword(id, password, options)
}
catch (e) {
return false;
throw new Meteor.Error(500, 'updateUser error', e);
}
}
Run Code Online (Sandbox Code Playgroud)
我想知道旧密码是否正确。