修正:用户没有设置姓名时,登录后左上角头像显示不正常。

pull/105/head
Apex Liu 2018-03-23 15:03:48 +08:00
parent 57f4518d69
commit 9425afc3eb
1 changed files with 3 additions and 0 deletions

View File

@ -105,6 +105,9 @@ def login(handler, username, password=None, oath_code=None):
del user_info['password'] del user_info['password']
del user_info['oath_secret'] del user_info['oath_secret']
if len(user_info['surname']) == 0:
user_info['surname'] = user_info['username']
return TPE_OK, user_info return TPE_OK, user_info