Skip to content

Commit

Permalink
Fix auth tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjmcgrath committed Aug 22, 2015
1 parent f4beecb commit a7ec861
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ def _login_user(self, data, auth_info, provider):
if user:
logging.info('Found existing user to log in')
# existing user. just log them in and update token.
user.populate(**self._to_user_model_attrs(data, provider, False))
user.populate(**self._to_user_model_attrs(
data, provider, False, user.username_lower))
user.put()
self.auth.set_session(self.auth.store.user_to_dict(user), remember=True)

Expand All @@ -104,7 +105,8 @@ def _login_user(self, data, auth_info, provider):
logging.info('Updating currently logged in user.')
user = self.current_user
user.auth_ids.append(auth_id)
user.populate(**self._to_user_model_attrs(data, provider, False))
user.populate(**self._to_user_model_attrs(
data, provider, False, user.username_lower))
user.put()
self.auth.set_session(self.auth.store.user_to_dict(user), remember=True)

Expand Down

0 comments on commit a7ec861

Please sign in to comment.