fixed janrain login with GAE

This commit is contained in:
mdipierro
2012-08-30 08:31:52 -05:00
parent e9dcabae7d
commit 2b83928cab
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.0.2 (2012-08-30 08:17:25) stable Version 2.0.2 (2012-08-30 08:31:49) stable
+4 -4
View File
@@ -1612,12 +1612,12 @@ class Auth(object):
checks = [] checks = []
# make a guess about who this user is # make a guess about who this user is
for fieldname in ['registration_id','username','email']: for fieldname in ['registration_id','username','email']:
if fieldname in table_user.fields() and keys.get(fieldname,None): if fieldname in table_user.fields() and \
keys.get(fieldname,None):
checks.append(fieldname) checks.append(fieldname)
value = keys[fieldname] value = keys[fieldname]
user = user or table_user._db( user = table_user(**{fieldname:value})
(table_user.registration_id==value)| if user: break
(table_user[fieldname]==value)).select().first()
if not checks: if not checks:
return None return None
if not 'registration_id' in keys: if not 'registration_id' in keys: