[RSS Feed/News] Recommended approach for changing post author on the fly?

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
As part of an addon that I'm building, I would need to change the owner/author of every post (to some set defined user_id) whenever a new one is made and this should be applicable to only a specific forum (the forum_id will be taken from the ACP as part of addon's option). My solution to this is as follows:

1. Create a new entity_pre_save code event listener
2. Use a hint of XF\Entity\Post to restrict it to only posts
3. In the static method, get the forum_id from the...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom