RSS Feed/News Changing watch state of a thread for a specific user

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
25,933
Points
823

Reputation:

A user has selected to watch all threads that they create and post in.

When I create a new post in a thread, the thread gets watched for that specific user

Code:

Code:
        $thread = \XF::em()->find('XF:Thread', $threadid);
        $user = \XF::em()->find('XF:User', $userid);
        $post = \XF::asVisitor($user, function() use ($thread, $message)
        {
            $creator = \XF::service('XF:Thread\Replier', $thread);
            $creator->setMessage($message)...

Read more

Continue reading...
 
Status
Not open for further replies.
Top