Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.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
meteor.js:Accounts.createUser奇怪的行为_Meteor - Fatal编程技术网

meteor.js:Accounts.createUser奇怪的行为

meteor.js:Accounts.createUser奇怪的行为,meteor,Meteor,我正在尝试创建一个不同于{{loginButtons}的授权系统 基本上不同的接口 通过谷歌、Github和Facebook,授权工作正常,但我不能仅仅通过电子邮件和密码注册用户 基于本教程,我创建了以下函数: Template.signup.events "submit #signup": (e, t) -> e.preventDefault() email = t.find('input[name="email"]').value password = t.find('input

我正在尝试创建一个不同于{{loginButtons}的授权系统 基本上不同的接口

通过谷歌、Github和Facebook,授权工作正常,但我不能仅仅通过电子邮件和密码注册用户

基于本教程,我创建了以下函数:

Template.signup.events "submit #signup": (e, t) ->
 e.preventDefault()
 email = t.find('input[name="email"]').value
 password = t.find('input[name="password"]').value

 console.log(email)
 console.log(password)

 Accounts.createUser
   email: email
   password: password
 , (err) ->
   if err
     console.log(err)

   else
     console.log("Success!!!")

 false
但是在

流星蒙戈

我看到:

meteor:PRIMARY> db.users.find().pretty();
{ "_id" : "hS9QkjTAN38zqfCit" }
就这样

其他东西呢?为什么只创建_id


我将非常感谢您的帮助-:

对不起!我的错误:我没有在中返回用户对象

Accounts.onCreateUser

未定义服务时