示例#1
0
def remove_sessions_for_user(user):
    """
    Permanently remove all stored sessions for the user from the DB.

    :param user: User
    :return:
    """

    Session.remove(Q('data.auth_user_id', 'eq', user._id))
示例#2
0
def remove_sessions_for_user(user):
    """
    Permanently remove all stored sessions for the user from the DB.

    :param user: User
    :return:
    """

    Session.remove(Q('data.auth_user_id', 'eq', user._id))
示例#3
0
def remove_session(session):
    """
    Remove a session from database

    :param session: Session
    :return:
    """

    Session.remove(Q('_id', 'eq', session._id))