Skip to content

Commit

Permalink
assign fullname to firstname if it can't be split
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseDeLoore authored Apr 2, 2020
1 parent b0b2c1c commit 854a7a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions microsoft_auth/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ def _verify_microsoft_user(self, microsoft_user, data):
first_name, last_name = "", ""
if fullname is not None:
try:
first_name, last_name = data["name"].split(" ", 1)
first_name, last_name = fullname.split(" ", 1)
except ValueError:
pass
firstname = fullname

try:
# create new Django user from provided data
Expand Down

0 comments on commit 854a7a0

Please sign in to comment.