【发布时间】:2016-08-23 16:11:24
【问题描述】:
此 Meteor 代码接受来自用户的电子邮件并调用服务器上的方法 createNewUser。
Meteor.methods({
'createNewUser': function (email) {
const userId = Accounts.createUser({email: email, password: 'dummy'});
Accounts.sendEnrollmentEmail(userId);
}
});
我收到一封包含此链接的电子邮件
http://localhost:3000/#/enroll-account/6I-arlzO2Kpz4N4KOtb_8UOO1dR_YrKbparLjsF9PNd
如何使用Accounts.onEnrollmentLink() 显示我为接受密码而制作的模板,因为现在它只带我到http://localhost:3000/#,顺便说一句,我没有使用路由包。
<template name="passwordCreate">
<h5>Please create a password for your account</h5>
<input type="text" name="pswrd1" placeholder="Enter a password">
<input type="text" name="pswrd2" placeholder="Re enter the password">
</template>
【问题讨论】:
标签: meteor