カスタム画像はステージングユーザーに追加できません

I’ve got a few staged users that regularly interact with our site. Several are automatic emails (e.g. from Digital Ocean, AWS, etc). It would be nice to have them easily identified in the Message inbox.

Digital Ocean have a Gravatar, and a very helpful image is applied to their avatar even though they are staged:

However, when I try to add a custom picture (to AWS in this case), I get this:

If we can have Gravatars, why not custom images?

「いいね!」 2

Because gravatar comes from email address, but custom avatar should come from user, and that can’t happen, because that user is staged. And no one ever build system where an admin can change avatar for staged users.

Just guessing, but you already knew that possibility.

「いいね!」 2

I’ve got a workaround for this issue. It involves digging into the rails console (backup first!):

In the server

cd /var/discourse
./launcher enter app
rails c

Convert the user

Then convert the user so that they are no longer staged:

Email address of the staged user to be converted

User.find_by_email("=EMAIL=").update(staged: false)`

Upload their picture

:up_arrow: Just as you would any other user

Convert them back to staged

User.find_by_email("=EMAIL=").update(staged: true)`

Done! Don’t forget to exit the console.

I haven’t had any issues with this (yet), but make no promises!