public function actionIntroduceThread()
{
$userId = $this->_input->filterSingle('user_id', XenForo_Input::UINT);
$user = $this->_getUserModel()->getUserById($userId);
if (!$user) {
return $this->responseError(new XenForo_Phrase('requested_member_not_found'), 404);
}
$searchModel = $this->_getSearchModel();
$constraints = array(
'user' => array($userId),
'content' => 'thread',
'node' => Ragtek_FW_Config::read('rit', 'node_id')
);
$searcher = new XenForo_Search_Searcher($searchModel);
$results = $searcher->searchGeneral('', $constraints, 'date', 1);
if (!$results) {
return $this->getNoSearchResultsResponse($searcher);
}
$search = $searchModel->insertSearch($results, 'user', '', array('user_id' => $userId), 'date', false);
return $this->responseRedirect(
XenForo_ControllerResponse_Redirect::SUCCESS,
XenForo_Link::buildPublicLink('search', $search),
''
);
}