diff --git a/ext/user/main.php b/ext/user/main.php index 8338c198..838e3a3f 100644 --- a/ext/user/main.php +++ b/ext/user/main.php @@ -5,8 +5,6 @@ * Description: Allows people to sign up to the website */ -require_once "lib/recaptchalib.php"; - class UserBlockBuildingEvent extends Event { var $parts = array(); @@ -111,16 +109,8 @@ class UserPage extends SimpleExtension { } else { try { - if(strlen($config->get_string('api_recaptcha_privkey')) > 0) { - $resp = recaptcha_check_answer( - $config->get_string('api_recaptcha_privkey'), - $_SERVER["REMOTE_ADDR"], - $_POST["recaptcha_challenge_field"], - $_POST["recaptcha_response_field"]); - - if(!$resp->is_valid) { - throw new UserCreationException("Error in captcha"); - } + if(!captcha_check()) { + throw new UserCreationException("Error in captcha"); } $uce = new UserCreationEvent($_POST['name'], $_POST['pass1'], $_POST['email']); diff --git a/ext/user/theme.php b/ext/user/theme.php index b36d529c..dfd0e563 100644 --- a/ext/user/theme.php +++ b/ext/user/theme.php @@ -48,8 +48,7 @@ class UserPageTheme extends Themelet { if(empty($tac)) {$html = "";} else {$html = "
$tac
";} - $rpk = $config->get_string("api_recaptcha_pubkey"); - $reca = empty($rpk) ? "" : "