mirror of https://github.com/zulip/zulip.git
Use the full_name if available
We were trying to default the users first name when using google auth, but it was getting lost when rendering the form. (imported from commit 710e0c2ce591488920458dca74209c75e7031abd)
This commit is contained in:
parent
439b86fe3b
commit
7e9c121ad3
|
@ -333,6 +333,10 @@ def accounts_register(request):
|
|||
except TypeError:
|
||||
# Let the user fill out a name and/or try another backend
|
||||
form = RegistrationForm()
|
||||
elif 'full_name' in request.POST:
|
||||
form = RegistrationForm(
|
||||
initial={'full_name': request.POST.get('full_name')}
|
||||
)
|
||||
else:
|
||||
form = RegistrationForm()
|
||||
else:
|
||||
|
|
|
@ -144,8 +144,8 @@ else:
|
|||
GOOGLE_CLIENT_ID = "835904834568-77mtr5mtmpgspj9b051del9i9r5t4g4n.apps.googleusercontent.com"
|
||||
|
||||
if DEPLOYED:
|
||||
GOOGLE_OAUTH2_CLIENT_ID = ''
|
||||
GOOGLE_OAUTH2_CLIENT_SECRET = ''
|
||||
GOOGLE_OAUTH2_CLIENT_ID = '835904834568-ag4p18v0sd9a0tero14r3gekn6shoen3.apps.googleusercontent.com'
|
||||
GOOGLE_OAUTH2_CLIENT_SECRET = 'xxxxxxxxxxxxxxxxxxxxxxxx'
|
||||
else:
|
||||
# Google OAUTH2 for dev with the redirect uri set to http://localhost:9991/accounts/login/google/done/
|
||||
GOOGLE_OAUTH2_CLIENT_ID = '607830223128-4qgthc7ofdqce232dk690t5jgkm1ce33.apps.googleusercontent.com'
|
||||
|
|
Loading…
Reference in New Issue