def create_user(): # Create a new user. user = User.create(session.get('identity'), session.get('email')) # The user has been created, update the session. user.sync(session) first_time_user() return user
def get_user(): user = User.get(session.get('identity')) if user: user.sync(session) return user