app/soc/views/helper/access.py
changeset 1192 b53fa1e05dbd
parent 1189 14357ec13647
child 1198 3318f8d00691
equal deleted inserted replaced
1191:bb530ca58bc5 1192:b53fa1e05dbd
   461       * if a User has this Gooogle Account in their formerAccounts list
   461       * if a User has this Gooogle Account in their formerAccounts list
   462     """
   462     """
   463 
   463 
   464     self.checkIsLoggedIn(django_args)
   464     self.checkIsLoggedIn(django_args)
   465 
   465 
   466     if not self.user and not user_logic.isFormerAccount(self.id):
   466     user_entity = user_logic.getForFields({'account':self.id}, unique=True)
       
   467 
       
   468     if not user_entity and not user_logic.isFormerAccount(self.id):
   467       # this account has not been used yet
   469       # this account has not been used yet
   468       return
   470       return
   469 
   471 
   470     message_fmt = DEF_USER_ACCOUNT_INVALID_MSG_FMT % {
   472     message_fmt = DEF_USER_ACCOUNT_INVALID_MSG_FMT % {
   471         'email' : self.id.email()}
   473         'email' : self.id.email()}