簡體   English   中英

如何更新當前用戶(帳戶)

[英]How to update the current user (Accounts)

我正在使用Accountsaccounts-hithub )。 現在一切正常,但現在我想更新當前用戶。

我已經嘗試過類似的事情

Accounts.update({_id: Meteor.user()._id}, {...});

出現錯誤,帳戶沒有方法update因此我嘗試創建一個用戶集合

Users = new Meteor.Collection('users');

這也是不允許的,它給我以下錯誤:

Error: A method named '/users/insert' is already defined

那么,如何更新當前用戶呢?

用戶詳細信息位於Meteor.users集合中。 因此,您可以使用Meteor.users.update()http://docs.meteor.com/#meteor_users )編輯用戶詳細信息。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM