Commit 24006f81 by Michael Nelson

GREEN: trailing spaces or thin spaces do not cause errors.

parent 8bf9b716
...@@ -132,8 +132,10 @@ class OpenIDBackend: ...@@ -132,8 +132,10 @@ class OpenIDBackend:
if fullname and not (first_name or last_name): if fullname and not (first_name or last_name):
# Django wants to store first and last names separately, # Django wants to store first and last names separately,
# so we do our best to split the full name. # so we do our best to split the full name.
if ' ' in fullname: fullname = fullname.strip()
first_name, last_name = fullname.rsplit(None, 1) split_names = fullname.rsplit(None, 1)
if len(split_names) == 2:
first_name, last_name = split_names
else: else:
first_name = u'' first_name = u''
last_name = fullname last_name = fullname
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment