app/soc/views/helper/access.py
changeset 1716 a387bb7a39d4
parent 1633 6b65707f4248
child 1776 f86b0fe5f4d9
equal deleted inserted replaced
1715:3ec1a9518452 1716:a387bb7a39d4
   575       * if a User has this Gooogle Account in their formerAccounts list
   575       * if a User has this Gooogle Account in their formerAccounts list
   576     """
   576     """
   577 
   577 
   578     self.checkIsLoggedIn()
   578     self.checkIsLoggedIn()
   579 
   579 
   580     if not self.user and not user_logic.isFormerAccount(self.id):
   580     fields = {'account': self.id}
       
   581     user_entity = user_logic.getForFields(fields, unique=True)
       
   582 
       
   583     if not user_entity and not user_logic.isFormerAccount(self.id):
   581       # this account has not been used yet
   584       # this account has not been used yet
   582       return
   585       return
   583 
   586 
   584     message_fmt = DEF_USER_ACCOUNT_INVALID_MSG_FMT % {
   587     message_fmt = DEF_USER_ACCOUNT_INVALID_MSG_FMT % {
   585         'email' : self.id.email()
   588         'email' : self.id.email()