Xenforo: CAPTCHA for new usergroup

Discussion in 'Community Software' started by MultiBam, Feb 9, 2014.

  1. MultiBam

    MultiBam Administrator Staff Member

    Edit: 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
        }
    to

    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(5)); // TODO: permission
        }
    This will force members of group id 5 to fill out a captcha. Registered users is usergroup 2.
     
    Last edited: Sep 18, 2015

Share This Page