equal
deleted
inserted
replaced
146 return (site_entity.site_name, site_entity.noreply_email) |
146 return (site_entity.site_name, site_entity.noreply_email) |
147 |
147 |
148 # use the email address of the current logged in user |
148 # use the email address of the current logged in user |
149 account = accounts.getCurrentAccount(normalize=False) |
149 account = accounts.getCurrentAccount(normalize=False) |
150 |
150 |
151 # we need to retrieve account seperately, as user_logic normalizes it |
151 # we need to retrieve account separately, as user_logic normalizes it |
152 # and the GAE admin API is case sensitive |
152 # and the GAE admin API is case sensitive |
153 user_entity = user_logic.logic.getForAccount(account) |
153 user_entity = user_logic.logic.getForAccount(account) |
154 |
154 |
155 if not account: |
155 if not (account and user_entity): |
156 logging.warning('Non-Authenticated user triggered getDefaultMailSender') |
156 logging.warning('Non-Authenticated user triggered getDefaultMailSender') |
157 return None |
157 return None |
158 |
158 |
159 return (user_entity.name, account.email()) |
159 return (user_entity.name, account.email()) |