Captcha for other usergroups

multibam

Member
Hello. Is it possible to add captcha-posting to other usergroup. I would like to add a few members to the usergroup "autoposters" to check if they pass the captcha...

Thanks,
 
Right now it's a hard-coded function:

library/XenForo/Visitor.php

Code:
	/**
	 * Returns true if the visitor should be shown a CAPTCHA.
	 *
	 * @return boolean
	 */
	public function showCaptcha()
	{
		return ($this->_user['user_id'] == 0); // TODO: permission
	}

You can modify this function to check groups. Example, add the red code:

Rich (BB code):
	/**
	 * Returns true if the visitor should be shown a CAPTCHA.
	 *
	 * @return boolean
	 */
	public function showCaptcha()
	{
		return ($this->_user['user_id'] == 0 OR $this->isMemberOf(6)); // TODO: permission
	}

That should force members of group id 6 to fill out a captcha.
 
Top Bottom