From 335e79777659f543d02d7f027b033b966d3bc866 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Thu, 10 Dec 2015 14:31:42 +0530 Subject: [PATCH] FIX: trip password reset username/email --- .../javascripts/discourse/controllers/forgot-password.js.es6 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/controllers/forgot-password.js.es6 b/app/assets/javascripts/discourse/controllers/forgot-password.js.es6 index 2a1c46fa4..00d551bd8 100644 --- a/app/assets/javascripts/discourse/controllers/forgot-password.js.es6 +++ b/app/assets/javascripts/discourse/controllers/forgot-password.js.es6 @@ -4,7 +4,7 @@ export default Ember.Controller.extend(ModalFunctionality, { // You need a value in the field to submit it. submitDisabled: function() { - return Ember.isEmpty(this.get('accountEmailOrUsername')) || this.get('disabled'); + return Ember.isEmpty(this.get('accountEmailOrUsername').trim()) || this.get('disabled'); }.property('accountEmailOrUsername', 'disabled'), actions: { @@ -43,7 +43,7 @@ export default Ember.Controller.extend(ModalFunctionality, { }; Discourse.ajax('/session/forgot_password', { - data: { login: this.get('accountEmailOrUsername') }, + data: { login: this.get('accountEmailOrUsername').trim() }, type: 'POST' }).then(success, fail).finally(function(){ setTimeout(function(){