Advertisement:

Author Topic: [TUTO] Disable captcha for logged in users  (Read 677 times)

volunteer

  • Full Member
  • ***
  • Posts: 241
[TUTO] Disable captcha for logged in users
« on: November 07, 2015, 03:41:25 am »
Found this in the HELP forum but thought it is quite a nice trick

Well, it has been a little tricky to find the "main switch" for this, because there is three different related helpers functions and seems each one is used in the several scripts that show captcha's. :D

Just add this at the very bottom of your theme functions.php (take care not to leave blank lines after this):

Code: [Select]
<?php
if (osc_is_web_user_logged_in()) {
    
Preference::newInstance()->set('enabled_recaptcha_items'0);
    
Preference::newInstance()->set('recaptchaPubKey''');
    
Preference::newInstance()->set('recaptchaPrivKey''');
}
?>

And you won't need to modify anything more, a logged-in user should never see a captcha anywhere.