def get_cur_user(): user = users.get_current_user() # try oauth if user is None: try: oauth_user = oauth.get_current_user() is_local_dummy_user = oauth_user.user_id() == '0' and oauth_user.email() == '*****@*****.**' if not is_local_dummy_user: user = oauth_user except oauth.OAuthRequestError as e: pass if user is not None: cache.add_recent_email(user.email()) return user
def get_cur_user(): user = users.get_current_user() # try oauth if user is None: try: oauth_user = oauth.get_current_user() is_local_dummy_user = oauth_user.user_id( ) == '0' and oauth_user.email() == '*****@*****.**' if not is_local_dummy_user: user = oauth_user except oauth.OAuthRequestError as e: pass if user is not None: cache.add_recent_email(user.email()) return user
def _get_cur_user(): user = users.get_current_user() if user is not None: cache.add_recent_email(user.email()) return user