app/soc/logic/site/id_user.py
changeset 202 b8b4a83788d4
parent 184 7c0b42aecd9b
child 223 a18e93e21672
equal deleted inserted replaced
201:bc7f0ac07fcb 202:b8b4a83788d4
    25 import re
    25 import re
    26 
    26 
    27 from google.appengine.api import users
    27 from google.appengine.api import users
    28 from google.appengine.ext import db
    28 from google.appengine.ext import db
    29 
    29 
       
    30 from soc.logic import key_name
    30 from soc.logic import out_of_band
    31 from soc.logic import out_of_band
    31 
    32 
    32 import soc.models.user
    33 import soc.models.user
    33 
    34 
    34 
    35 
    39     id: a Google Account (users.User) object
    40     id: a Google Account (users.User) object
    40   """
    41   """
    41   if not id:
    42   if not id:
    42     return None
    43     return None
    43 
    44 
    44   return 'User:%s' % id.email()
    45   return key_name.nameUser(id.email())
    45 
    46 
    46 
    47 
    47 def getIdIfMissing(id=None):
    48 def getIdIfMissing(id=None):
    48   """Gets Google Account of logged-in user (possibly None) if id is false.
    49   """Gets Google Account of logged-in user (possibly None) if id is false.
    49   
    50