hooks/syncsession.py
changeset 10663 54b8a1f249fb
parent 9913 a74e9e43806a
child 10666 7f6b5f023884
equal deleted inserted replaced
10662:10942ed172de 10663:54b8a1f249fb
    24 from cubicweb.predicates import is_instance
    24 from cubicweb.predicates import is_instance
    25 from cubicweb.server import hook
    25 from cubicweb.server import hook
    26 
    26 
    27 
    27 
    28 def get_user_sessions(repo, ueid):
    28 def get_user_sessions(repo, ueid):
    29     for session in repo._sessions.itervalues():
    29     for session in repo._sessions.values():
    30         if ueid == session.user.eid:
    30         if ueid == session.user.eid:
    31             yield session
    31             yield session
    32 
    32 
    33 
    33 
    34 class SyncSessionHook(hook.Hook):
    34 class SyncSessionHook(hook.Hook):