How to delete all user names?

Hi. I imported from phpbb some time ago.
The script guessed the user names from the email addresses.

A user who didn’t post years before the migration found his real name on the forum and sent me a message to ask us removing his name.
Today, an active user didn’t know his real name was displayed when we clicked on his name (displaying the user card).

I would like to remove all the user names from the database. I guess this can be done with a short rails script?

1 Like

This might do it

rails c
User.all.update_all(name: "") 

But you could just uncheck this setting

enable names

Show the user’s full name on their profile, user card, and emails. Disable to hide fu

5 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.