FIX: checkEmail was calling itself (#6878)

approved

#1

FIX: checkEmail was calling itself (#6878)

diff --git a/app/assets/javascripts/discourse/controllers/preferences/account.js.es6 b/app/assets/javascripts/discourse/controllers/preferences/account.js.es6
index 2935039..d98fe12 100644
--- a/app/assets/javascripts/discourse/controllers/preferences/account.js.es6
+++ b/app/assets/javascripts/discourse/controllers/preferences/account.js.es6
@@ -126,10 +126,6 @@ export default Ember.Controller.extend(
     },
 
     actions: {
-      checkEmail() {
-        this.send("checkEmail");
-      },
-
       save() {
         this.set("saved", false);
 
diff --git a/app/assets/javascripts/discourse/templates/preferences/account.hbs b/app/assets/javascripts/discourse/templates/preferences/account.hbs
index d2f77f9..93cf10f 100644
--- a/app/assets/javascripts/discourse/templates/preferences/account.hbs
+++ b/app/assets/javascripts/discourse/templates/preferences/account.hbs
@@ -45,7 +45,7 @@
       </div>
     {{else}}
       <div class="controls">
-        {{d-button action=(action "checkEmail") class="btn-default" actionParam=model title="admin.users.check_email.title" icon="envelope-o" label="admin.users.check_email.text"}}
+        {{d-button action=(route-action "checkEmail") class="btn-default" actionParam=model title="admin.users.check_email.title" icon="envelope-o" label="admin.users.check_email.text"}}
       </div>
     {{/if}}
   </div>
@@ -132,7 +132,7 @@
       </table>
     {{else}}
       <div class="controls">
-        {{d-button action=(action "checkEmail") actionParam=model title="admin.users.check_email.title" icon="envelope-o" label="admin.users.check_email.text"}}
+        {{d-button action=(route-action "checkEmail") actionParam=model title="admin.users.check_email.title" icon="envelope-o" label="admin.users.check_email.text"}}
       </div>
     {{/if}}
   </div>

GitHub sha: dcdcaebd


#2