accounts-password
使用andaccounts-ui
模块创建用户后,当我Meteor.user()
在控制台中调用时,我没有得到完整的配置文件,只有_id
and username
,即使文档上有更多内容,比如createdAt
记录。
如果我使用这些模板,也会出现同样的问题:
<template name="user_list">
<div class="user-list">
<h1>Users</h1>
<ul>
{{#each allUsers}}
{{> user_item}}
{{/each}}
</ul>
</div>
</template>
<template name="user_item">
<li class="user-item">
<p><b>{{username}}</b></p>
<p>Created: {{createdAt}}</p>
</li>
</template>
...由这个助手支持:
Template.user_list.helpers({
allUsers: function () {
return Meteor.users.find({});
}
});
在这种情况下,user_list 模板很好地遍历了用户,并显示了用户名,但createdAt
帮助程序失败了,即使我通过meteor mongo
记录肯定存在。我没有删除自动发布;我的设置仍然完全开放。为什么我不能访问其余的用户记录?