לא ניתן להוסיף תמונות מותאמות למשתמשים שהועמדו

סיכום מבוסס בינה מלאכותית

nathank reports that while Gravatar images can be applied to staged users, custom images cannot, and suggests allowing admins to set avatars for staged users. Jagster explains that Gravatars are tied to email addresses, while custom avatars require user interaction, which staged users lack. nathank shares a workaround involving converting the user to non-staged, uploading the image, and converting back. sam agrees with the suggestion and tags the post as pr-welcome.

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 לייקים

מאחר ו- gravatar מגיע מכתובת אימייל, אך תמונת פרופיל מותאמת אישית צריכה לבוא מהמשתמש, וחוסר אפשרות זו מתרחשת כי המשתמש הוא בשלב ההכנה. ואין אף אחד שבנה מערכת שבה מנהל יכול לשנות את התמונה המשתפת למשתמשים בשלב ההכנה.

רק מניחים, אבל אתה כבר ידעת את ההאפשרות הזאת.

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

Probably not necessary unless you really want them to stay ‘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!

2 לייקים

למען האמת, איני יכול לחשוב על כל חסרונות לאפשר למנהלים להגדיר את אווטאר המשתמשים המוצגים.

אשים pr-welcome על זה

לייק 1