• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 increase matched users with mentions

andybond

Active member
#1
Hello,

Is it possible to increase the number of matched users when using the mentions system ?

My understand is that 10 are returned , but I would like 25 if possible ?

Andy
 

Jake Bunce

XenForo moderator
Staff member
#2
It appears to be hard-coded:

library/XenForo/ControllerPublic/Member.php

Code:
	/**
	 * Finds valid members matching the specified username prefix.
	 *
	 * @return XenForo_ControllerResponse_Abstract
	 */
	public function actionFind()
	{
		$q = ltrim($this->_input->filterSingle('q', XenForo_Input::STRING, array('noTrim' => true)));

		if ($q !== '' && utf8_strlen($q) >= 2)
		{
			$users = $this->_getUserModel()->getUsers(
				array(
					'username' => array($q , 'r'),
					'user_state' => 'valid',
					'is_banned' => 0,
					'active_recently' => true
				),
				array('limit' => 10)
			);
		}
		else
		{
			$users = array();
		}

		$viewParams = array(
			'users' => $users
		);

		return $this->responseView(
			'XenForo_ViewPublic_Member_Find',
			'member_autocomplete',
			$viewParams
		);
	}