dandi / dandi-archive

DANDI API server and Web app
https://dandiarchive.org
13 stars 10 forks source link

Use dandi account full name in user welcome email #600

Open waxlamp opened 2 years ago

waxlamp commented 2 years ago

This line exclusively uses the social account's name information to build the welcome email. Now that we have access to the user's name as reported in the questionnaire, we should use that name instead.

waxlamp commented 2 years ago

This has been implemented.

mvandenburgh commented 2 years ago

I thought this was implemented too, but apparently it's not. This line is still pulling the user's name from their github profile.

waxlamp commented 2 years ago

Are you sure? I thought that line is grabbing the full name and falling back on the github username if it can't find one. Recent registration emails show the user's full name.

mvandenburgh commented 2 years ago

Are you sure? I thought that line is grabbing the full name and falling back on the github username if it can't find one. Recent registration emails show the user's full name.

It's grabbing their full name from their github profile and falling back on the github username if it can't find one. socialaccount.extra_data is a JSON blob that we get from github that contains user profile info. So instead of using that, we'd want to use the user.first_name and user.last_name fields that we collect from them in the user questionnaire.