CMTV
Well-known member
Is there a stable and clean way to get all users that are watching given thread including email subscription?
Something like:
I searched for this in xF code and found only this very strange construction:
I also found
Another way might be using
Something like:
PHP:
$watchers = getWatchers($thread);
I searched for this in xF code and found only this very strange construction:
PHP:
!empty($thread->Watch[$visitor->user_id])
I also found
setWatchState($thread, $user, $state)
method but there is no getWatchState(...)
method...Another way might be using
xf_thread_watch
table directly as it contains all data I need (user_id, thread_id, email_subscription)...