def logout():
    """
    Logs out the user.
    """
    db_session = db.get_session()
    if type(current_user) is User:
        current_user.logout(db_session)
    db_session.close()
    logout_user()
    return redirect(url_for('home_index'))
def logout():
    """
    Logs out the user.
    """
    session['access_token'] = None
    db_session = db.get_session()
    if type(current_user) is UserStore:
        current_user.logout(db_session)
    logout_user()
    return redirect(url_for('home_index'))
def logout():
    """
    Logs out the user.
    """
    db_session = db.get_session()
    if type(current_user) is User:
        current_user.logout(db_session)
    db_session.close()
    logout_user()
    return redirect(url_for('home_index'))
Exemplo n.º 4
0
def logout():
    """
    Logs out the user.
    """
    session['access_token'] = None
    db_session = db.get_session()
    if type(current_user) is UserStore:
        current_user.logout(db_session)
    logout_user()
    return redirect(url_for('home_index'))
def logout():
    """
    Logs out the user.
    """
    session['access_token'] = None
    db_session = db.get_session()
    try:
        if type(current_user) is User:
            current_user.logout(db_session)
    finally:
        db_session.close()
    logout_user()
    return redirect(url_for('home_index'))
Exemplo n.º 6
0
def logout():
    session.clear()
    current_user.logout()
    return redirect(url_for("index"))
Exemplo n.º 7
0
def api_v1_logout():
    current_user.logout()
    return success()