Updating user mentions after user rename

Hi guys.

I have few users to rename on a forum and I also want to update the mentions. There is any chance i can do this with some kind of console magic or something similar?

The usernames that I have to change are pretty unique, and there are zero chances to replace something wrong (unless there is some serialization involved, dunno)

Thanks!

1 Like
cd /var/discourse
./launcher enter app
discourse remap " @bob " " @bill "

but this is a very high risk move, I would back up db first and test it on dev, it performs a global rename on all columns in all tables.

Personally I would just skip doing this or write something custom that only targets mentions.

4 Likes

The usernames that needs to be changed are very unique (i.e. facebook usernames + a random string, from a modifiev version of SSO plugin for WordPress).

Anyhow, I ran the commands and no luck (also rebuild the app), until i realized that it runs better without spaces :smile:

So it works fine! Thank you.

2 Likes

This topic was automatically closed after 3237 days. New replies are no longer allowed.