User user IDs instead of email addresses for profile keys, since they're permanent.
This commit is contained in:
@@ -23,10 +23,10 @@ from cosmopolite.lib import models
|
||||
def CreateClientAndProfile(client_id, google_user):
|
||||
if google_user:
|
||||
# We're going to need a profile for this user regardless
|
||||
profile = models.Profile.get_by_key_name(str(google_user))
|
||||
profile = models.Profile.get_by_key_name(google_user.user_id())
|
||||
if not profile:
|
||||
profile = models.Profile(
|
||||
key_name=str(google_user), google_user=google_user)
|
||||
key_name=google_user.user_id(), google_user=google_user)
|
||||
profile.put()
|
||||
else:
|
||||
profile = None
|
||||
|
||||
Reference in New Issue
Block a user