I’m migrating the content and user profiles from an old project and since the users in the project are no longer active, I decided to import them with
active = false, which works great to avoid sending them emails that they won’t care about.
The only problem is that the profiles of inactive users are not visible by logged out visitors, which is a big part of the migration, keeping both the content and the user profiles reachable. I’m still getting traffic for the old URLs which I plan on redirecting to their Discourse equivalent.
I can think of two solutions, but none of them feels optimal:
Keep the users inactive and write a plugin to reopen
UserControllerand rewrite the
showmethod to force
fetch_user_from_params. Doesn’t feel great because I would be duplicating the whole method to change a single line.
Activate the users, and disable all their email preferences. Not sure if it would be safe to rely on that to avoid all emails.