如何从 Ejabberd 的所有花名册中删除用户

发布于 2024-08-16 22:45:10 字数 188 浏览 4 评论 0原文

我想删除一个聊天帐户,同时:

  1. 删除他的名册 将
  2. 他从他的所有好友名册中删除

我该怎么做?

我尝试过 ejabberdctl 的各种选项。我可以注销用户,甚至清除他的名册,但我找不到方法将他从其他名册中删除。

PS:我的所有用户当前都在一台服务器/主机上

I want to delete a chat account and at the same time :

  1. Delete his roster
  2. Delete him from all of his friends rosters

How can i do this?

I have tried the various options of ejabberdctl. I can unregister a user, and even purge his roster, but I cant find a way to remove him from other rosters.

PS : All my users are currently on one server/host

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

痴骨ら 2024-08-23 22:45:10

如果您将名册数据保存在 mnesia (mod_roster) 中而不是外部数据库 (mod_roster_odbc) 中,则 mod_admin_extra:delete_rosteritem/4 可能会帮助您删除用户的花名册。否则,您将不得不使用 odbc_queries 功能。

如果用户的联系人也是您的用户(不允许 s2s 连接),那么您可以使用带有交换参数的 delete_rosteritem,或使用 mnesia/odbc hackery。在联合设置中,您将无权访问联系人的花名册,但您可以向他的服务器发送两个消息:存在取消订阅和存在取消订阅节。请参阅 RFC 3921 或询问详细信息。

不幸的是,我不知道现成的解决方案,但可能会在接下来的几周内提出一个。

If you save the roster data in mnesia (mod_roster) and not in an external database (mod_roster_odbc), then mod_admin_extra:delete_rosteritem/4 might help you to delete the user's roster. Otherwise you will have to use odbc_queries functionality.

If the user's contacts are your users as well (no s2s connections allowed), then you might use delete_rosteritem with swapped arguments, or use mnesia/odbc hackery. In a federated setup you will not have access to the contact's roster, but you can probably send his server both, an presence unsubscribe and a presence unsubscribed stanza. See RFC 3921 or ask for detail.

Unfortunately, I do not know a ready-to-use solution, but might come up with one in the following weeks.

但可醉心 2024-08-23 22:45:10

通常,删除用户将从所有本地用户名册中取消订阅该用户,并通过服务器到服务器组件向远程用户发送取消订阅请求。您可能需要查看临时命令,其中ejabberd 支持。通过这种方式,您可以编写一个工具来从命令行执行此操作,这就是您想要从问题标签中看到的内容。

网络管理 UI 可能是一个很受欢迎的地方。我知道这就是我用 openfire 完成的地方。

Usually deleting a user will unsubscribe them from all the local user's rosters, as well as send remote users unsubscribe requests through the server-to-server component. You may want to look at ad-hoc commands, which ejabberd supports. This way you can script a tool to do it from the command line, which is what it looks like you want from your question tags.

The web admin UI may be a popular place to do it. I know that is where I've done it with openfire.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文