小编san*_*ana的帖子

在meteor JS中检查用户的密码

在我的 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)

我想知道旧密码是否正确。

javascript meteor

5
推荐指数
1
解决办法
1906
查看次数

标签 统计

javascript ×1

meteor ×1