Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/434.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Meteor Accounts.onEmailVerificationLink不’;行不通_Javascript_Angularjs_Meteor_Angular Meteor_Email Verification - Fatal编程技术网

Javascript Meteor Accounts.onEmailVerificationLink不’;行不通

Javascript Meteor Accounts.onEmailVerificationLink不’;行不通,javascript,angularjs,meteor,angular-meteor,email-verification,Javascript,Angularjs,Meteor,Angular Meteor,Email Verification,我用的是角流星 我希望用户通过Accounts.sendVerificationEmail() (向单击用户发送带有令牌的URL) 我已经捕获了令牌,可以在console.log()中看到它 我的问题是,onemailvificationlink中没有运行,即使我正在传递令牌参数。 这是可以检查的,因为它没有打印到console.log() 下一步我的代码在客户端 my-app\imports\ui\components\verifyMail\verifyMail.html 电子邮件验证回调

我用的是角流星

我希望用户通过
Accounts.sendVerificationEmail()
(向单击用户发送带有令牌的URL) 我已经捕获了令牌,可以在
console.log()中看到它

我的问题是,
onemailvificationlink
中没有运行,即使我正在传递令牌参数。 这是可以检查的,因为它没有打印到
console.log()

下一步我的代码在客户端

my-app\imports\ui\components\verifyMail\verifyMail.html


电子邮件验证回调发生在服务器上

或者,如果使用集合挂钩(),可以执行以下操作:

Meteor.users.after.update(function (userId, doc, fieldNames, modifier, options) {
  if (!!modifier.$set) {
    //check if the email was verified
    if (modifier.$set['emails.$.verified'] === true) {
      //do something
    }
  }
});
Meteor.users.after.update(function (userId, doc, fieldNames, modifier, options) {
  if (!!modifier.$set) {
    //check if the email was verified
    if (modifier.$set['emails.$.verified'] === true) {
      //do something
    }
  }
});