流星帐户 - ui忘记密码未定义

时间:2015-06-17 18:36:03

标签: meteor forgot-password

我是流星

accounts-password 
and accounts-ui

我已经设置了我的Accounts.templates,以便我可以收到有效的电子邮件, 但是,当我使用帐户-ui忘记密码时,我得到了来自未定义的' 我不太确定Accounts.templates .from属性是我需要使用的那个

I20150617-14:36:42.009(-7)? Exception while invoking method     
forgotPassword' TypeError: Cannot read property 'from' of undefined
I20150617-14:36:42.009(-7)?at Object.Accounts.sendResetPasswordEmail (packages/accounts-password/password_server.js:406:1)
I20150617-14:36:42.009(-7)?     at [object Object].Meteor.methods.forgotPassword (packages/accounts-password/password_server.js:365:1)
I20150617-14:36:42.009(-7)?     at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1617:1)
I20150617-14:36:42.009(-7)?     at packages/ddp/livedata_server.js:648:1
I20150617-14:36:42.009(-7)?     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150617-14:36:42.009(-7)?     at packages/ddp/livedata_server.js:647:1
I20150617-14:36:42.009(-7)?     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150617-14:36:42.009(-7)?     at [object Object]._.extend.protocol_handlers.method (packages/ddp/livedata_server.js:646:1)
I20150617-14:36:42.009(-7)?     at packages/ddp/livedata_server.js:546:1

有人可以帮我解决这个问题吗? 对不起格式化我格式化的新格式 非常感谢

Accounts.emailTemplates = {
  from: " Meteor Accounts <no-rely@meteor.com>",
  verifyEmail: {
    subject: function(user) {
      return "Please verify and active your email";
    },
    text: function(user, url) {
      //console.log(user.profile);
      var username = "\nYour username is: " + user.username;
      var password = "\nYour default password is:" + "123456" + "(Please change           it asap while you login)";
      var greeting = (user.profile && user.profile.empName.firstName) ?
        ("Hello " + user.profile.empName.firstName + ":") : ("Hello," + "\n");

      greeting = greeting + username + "\n" + password + "\n" + "\n" + "To verify your account email, simply click the link below.\n" + "\n" + url + "\n" + "\n" + "Thanks.\n";

      return greeting;
    }
  }
}

0 个答案:

没有答案
相关问题