Skip to content

Commit f70607a

Browse files
authored
Merge pull request #273 from RayBB/patch-1
check auth token when getting user
2 parents 98b6c48 + 804de49 commit f70607a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

infogami/infobase/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,8 +531,8 @@ def reset_password(self, username, code, password):
531531
)
532532

533533
def get_user(self):
534-
# avoid hitting infobase when there is no cookie.
535-
if web.cookies().get(config.login_cookie_name) is None:
534+
# avoid hitting infobase when there is no auth token set.
535+
if self._conn.get_auth_token() is None:
536536
return None
537537
try:
538538
data = self._request('/account/get_user')

0 commit comments

Comments
 (0)