do not use captcha by default

This commit is contained in:
Matthew Hodgson 2014-11-15 01:29:15 +00:00
parent 8c2b5ea7c4
commit a7ddcc9c0f
1 changed files with 5 additions and 11 deletions

View File

@ -20,7 +20,7 @@ angular.module('RegisterController', ['matrixService'])
'use strict'; 'use strict';
var config = window.webClientConfig; var config = window.webClientConfig;
var useCaptcha = true; var useCaptcha = false; // default to no captcha to make it easier to get a homeserver up and running...
if (config !== undefined) { if (config !== undefined) {
useCaptcha = config.useCaptcha; useCaptcha = config.useCaptcha;
} }
@ -167,16 +167,10 @@ angular.module('RegisterController', ['matrixService'])
var setupCaptcha = function() { var setupCaptcha = function() {
console.log("Setting up ReCaptcha") console.log("Setting up ReCaptcha")
var config = window.webClientConfig; var public_key = window.webClientConfig.recaptcha_public_key;
var public_key = undefined; if (public_key === undefined) {
if (config === undefined) { console.error("No public key defined for captcha!")
console.error("Couldn't find webClientConfig. Cannot get public key for captcha."); return;
}
else {
public_key = webClientConfig.recaptcha_public_key;
if (public_key === undefined) {
console.error("No public key defined for captcha!")
}
} }
Recaptcha.create(public_key, Recaptcha.create(public_key,
"regcaptcha", "regcaptcha",