1. 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

Discussion in 'XenForo Questions and Support' started by andybond, May 14, 2016.

  1. andybond

    andybond Active Member

    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
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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
    		);
    	}
    
     
    andybond likes this.
  3. andybond

    andybond Active Member

Share This Page