create_account_controller.js passwordRequired needs the same logic as user_authenticator. Make twitter and facebook signup work again.

This commit is contained in:
Neil Lalonde 2013-12-17 12:29:29 -05:00
parent 4c6b535cc0
commit 7fa07f3401
2 changed files with 2 additions and 1 deletions

View File

@ -27,7 +27,7 @@ Discourse.CreateAccountController = Discourse.Controller.extend(Discourse.ModalF
}.property('nameValidation.failed', 'emailValidation.failed', 'usernameValidation.failed', 'passwordValidation.failed', 'formSubmitted'),
passwordRequired: function() {
return this.blank('authOptions.auth_provider');
return (this.blank('authOptions.auth_provider') || this.blank('authOptions.email_valid') || !this.get('authOptions.email_valid'));
}.property('authOptions.auth_provider'),
passwordInstructions: function() {

View File

@ -12,6 +12,7 @@ class Auth::FacebookAuthenticator < Auth::Authenticator
facebook_hash = session_info[:facebook]
result.email = email = session_info[:email]
result.email_valid = true
result.name = name = facebook_hash[:name]
result.extra_data = facebook_hash