Exemple #1
0
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
Exemple #2
0
def get_user():
    user = User.get(session.get('identity'))
    if user:
        user.sync(session)
    return user