Siropu Well-known member Apr 28, 2018 #1 I'm in a situation where I have to set a custom user when creating a thread but setUser is a protected method. Why not make it public? Upvote 1
I'm in a situation where I have to set a custom user when creating a thread but setUser is a protected method. Why not make it public?
Steffen Well-known member Apr 28, 2018 #2 That would be useful. I'm currently temporarily overriding the current visitor in these cases. IIRC this applies to other services like Post\Replier, too.
That would be useful. I'm currently temporarily overriding the current visitor in these cases. IIRC this applies to other services like Post\Replier, too.
Chris D XenForo developer Staff member Apr 28, 2018 #3 This is deliberately not public. You need to use XF::asVisitor to set the user properly so we can be sure we’ve got the same visitor for the lifetime of the service.
This is deliberately not public. You need to use XF::asVisitor to set the user properly so we can be sure we’ve got the same visitor for the lifetime of the service.