Skip to content

Conversation

@Grubba27
Copy link
Contributor

@Grubba27 Grubba27 commented Oct 20, 2025

With this PR, we add the core functionalities for this plugin:

  • Blocks usernames that contain parts of the user's real last name.
    • optionally, you can let users only use suggested usernames
  • Provides a button to generate random usernames during sign-up (currently only in invites).
Screen.Recording.2025-10-20.at.17.31.09.mov

Requires discourse/discourse#35506 to make test pass

With this PR we add the core functionalities for this plugin:

- Blocks usernames that contain parts of the user's real last name.
- Provides a button to generate random usernames during sign-up (currently only in invites).
plugin.rb Outdated

after_initialize do
# Code which should run after Rails has finished booting
on(:user_created) do |user|

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is after_commit on create.. isn't the data already in the DB by now?
https://github.com/discourse/discourse/blob/f51960287f6a7297243fd904966811c90b7ce5b1/app/models/user.rb#L207

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants