summary refs log tree commit diff
path: root/webclient/login
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-09-05 13:56:36 -0700
committerKegan Dougal <kegan@matrix.org>2014-09-05 13:56:36 -0700
commit130458385e919d886fcdfc4203354e93e9e8f1b1 (patch)
treeadeeb7058a9722b04f84230e2e75ac90567b4c9b /webclient/login
parentAdded basic captcha, not hooked up (diff)
downloadsynapse-130458385e919d886fcdfc4203354e93e9e8f1b1.tar.xz
Modified matrixService.register to specify if captcha results should be sent with the registration request. This is toggleable via useCaptcha in register-controller.
Diffstat (limited to 'webclient/login')
-rw-r--r--webclient/login/register-controller.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/webclient/login/register-controller.js b/webclient/login/register-controller.js
index 1c1f4c42f3..9d02f274df 100644
--- a/webclient/login/register-controller.js
+++ b/webclient/login/register-controller.js
@@ -19,6 +19,8 @@ angular.module('RegisterController', ['matrixService'])
                                     function($scope, $rootScope, $location, matrixService, eventStreamService) {
     'use strict';
     
+    var useCaptcha = false;
+    
     // FIXME: factor out duplication with login-controller.js
     
     // Assume that this is hosted on the home server, in which case the URL
@@ -87,7 +89,7 @@ angular.module('RegisterController', ['matrixService'])
     };
 
     $scope.registerWithMxidAndPassword = function(mxid, password, threepidCreds) {
-        matrixService.register(mxid, password, threepidCreds).then(
+        matrixService.register(mxid, password, threepidCreds, useCaptcha).then(
             function(response) {
                 $scope.feedback = "Success";
                 // Update the current config 
@@ -154,7 +156,9 @@ angular.module('RegisterController', ['matrixService'])
 	};
 
 	$scope.init = function() {
-	    setupCaptcha();
+        if (useCaptcha) {
+	        setupCaptcha();
+        }
 	};
     
 }]);