allow arbitrary username to enable register and sign in with facebook, thanks Ting-Yu Chou

This commit is contained in:
mdipierro
2013-05-06 22:49:04 -05:00
parent e44254346c
commit cdd3f6ed00
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.4.6-stable+timestamp.2013.05.06.19.49.05
Version 2.4.6-stable+timestamp.2013.05.06.22.48.04
+3 -1
View File
@@ -2249,7 +2249,9 @@ class Auth(object):
log = self.messages.register_log
table_user = self.table_user()
if 'username' in table_user.fields:
if self.settings.login_userfield:
username = self.settings.login_userfield
elif 'username' in table_user.fields:
username = 'username'
else:
username = 'email'