Skip to content

Commit 7c2c260

Browse files
kyriasjelly
authored andcommitted
devel/views: Actually save first and last names when they change
Commit e4b211e (Allow users to set their own names, 2021-10-14) tried to allow users to set their own names. It correctly handles the latin name field, but it doesn't end up actually saving changes to the first and last name fields. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
1 parent 69cfee8 commit 7c2c260

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

devel/views.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ def change_profile(request):
234234
instance=profile)
235235
if form.is_valid() and profile_form.is_valid():
236236
request.user.email = form.cleaned_data['email']
237+
request.user.first_name = form.cleaned_data['first_name']
238+
request.user.last_name = form.cleaned_data['last_name']
237239
if form.cleaned_data['passwd1']:
238240
request.user.set_password(form.cleaned_data['passwd1'])
239241
with transaction.atomic():

0 commit comments

Comments
 (0)