自动分配随机的匿名用户名

Is there a way to auto assign an anonymous username without allowing users to create their own?

1 个赞

I think they the easiest way would be to use an external authentication system and DiscourseConnect - Official Single-Sign-On for Discourse (sso). Otherwise you could do it with a plugin. Another solution (though you don’t say exactly why this is a problem) might be theme component that obscured the username.

1 个赞

Hi Jay,

Sorry I should have given more context. The forum is for victims of abuse so for safeguarding the users should be anonymous. So when registering rather than give them a load of things they can’t do I thought it might just be helpful to have a username generated for them if that makes sense?

Thanks

There is an anonymous mode option available in discourse but that is not a way to create anonymous accounts. One needs to be able to create an account then they could switch to anonymous profile and post from there. While this may not be the solution you’re looking for, a fully anonymous registration and posting solution doesn’t exist in discourse core. it may be possible to create a custom plugin that just lets someone click a button and populate all fields of the registration form with random anonymous data but then, how do they sign back in once they log out?

2 个赞

Sorry we’re happy with the level of anonymity we have set up, we know who the users are but they aren’t supposed be able to identify each other.

So the only functionality I’m after is setting a generic username automatically when people register and not allowing them to set their own

1 个赞

I’m sure such a system doesn’t exist in discourse but I think it should be achievable in a plugin (or maybe a theme component) to automatically populate the username field. Such a plugin doesn’t exist either.

2 个赞

You could probably write a JavaScript theme component that would auto-enter the username field on the “create a new account” page with a random username, when that page appears.

(@osioke here’s an example of a good audition task for a technical community advocate, perhaps?)

3 个赞

您好,

我再次提出这个问题,因为我们希望如果可能的话,能够进行开发。如果任何人有关于谁可以为我们做这件事的建议,那就太好了。

谢谢
Stuart

建议的主题组件听起来是个不错的方法。它可以生成一个随机用户名,并且看起来就像用户自己输入的一样。不过,用户仍然可以覆盖它。我想你可以用 CSS 隐藏它,但那样他们怎么知道自己的用户名呢?

有人最终创建了这个吗?我很想为我们的论坛获得完全相同的东西。

2 个赞

我们需要这个。

您想要名字是无意义的还是字典里的随机单词?

我猜您没有预算。

1 个赞

现在有了一个插件 GitHub - communiteq/discourse-random-usernames: Forces randomly generated usernames

5 个赞