XF 2.0 Latest status widget

abdfahim

Well-known member
I am trying to convert Latest Profile Post widget to Latest Status widget. From database, I think it's enough to add the criteria profile_user_id == user_id into the Latest Profile Post code below

Code:
/** @var \XF\Finder\ProfilePost $profilePostFinder */
$profilePostFinder = $this->finder('XF:ProfilePost');
$profilePostFinder
->with(['ProfileUser', 'ProfileUser.Privacy', 'User'])
->where('message_state', 'visible')
->order('post_date', 'DESC')
->limit(max($limit * 2, 10));

Is it possible to do that with this existing repo, or I need to define new repo (or use raw query)?
 
Top Bottom