diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index f7e1b3976..cf6b352c0 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -56,7 +56,7 @@
<% end %>
- <% if alert or flash[:error]%>
+ <% if alert and !alert.empty? or flash[:error]%>
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index 6d68c4a2a..44e150e27 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -169,7 +169,7 @@ Devise.setup do |config|
# initial account confirmation) to be applied. Requires additional unconfirmed_email
# db field (see migrations). Until confirmed, new email is stored in
# unconfirmed_email column, and copied to email column on successful confirmation.
- config.reconfirmable = true
+ config.reconfirmable = Rails.configuration.x.enable_email_confirmations
# Defines which key will be used when confirming an account
# config.confirmation_keys = [:email]
diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml
index 501a47192..4bf5220cd 100644
--- a/config/locales/devise.en.yml
+++ b/config/locales/devise.en.yml
@@ -7,7 +7,8 @@ en:
send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
failure:
- already_authenticated: "You are already logged in."
+# already_authenticated: "You are already logged in."
+ already_authenticated: ""
inactive: "Your account is not activated yet."
invalid: "Invalid %{authentication_keys} or password."
locked: "Your account is locked."