使用accounts.ui包验证电子邮件 [英] verify email using accounts.ui package
本文介绍了使用accounts.ui包验证电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在创建某个用户时发送验证电子邮件。我使用accounts-password包,所以我的代码中调用了任何Accounts方法。
I want to send a verification email when some user is created. I use the accounts-password package, so any Accounts methods are called in my code.
我阅读了需要调用的文档:
I read in documentation that I need to call:
Accounts.sendVerificationEmail userId,[email])
但问题是我不知道什么时候打电话。
but the problem is that I don't know when to call it.
我尝试调用 Accounts.onCreateUser(func)
的回调函数,但用户尚未创建而在数据库中。
I tried to call in the callback function of Accounts.onCreateUser(func)
but the user had not been created yet in the database.
任何想法?
推荐答案
>
on the serverside:
Accounts.config({sendVerificationEmail: true, forbidClientAccountCreation: false});
从上面的评论得到答案。
got the answer from the comments above.
这篇关于使用accounts.ui包验证电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文