mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 18:24:52 -06:00
Fix a problem where you might see missing {{sentTo}} value after a failed login
This commit is contained in:
parent
f76d6c0f3f
commit
cbe0168922
@ -27,7 +27,12 @@ class SessionController < ApplicationController
|
||||
render_serialized(@user, UserSerializer)
|
||||
return
|
||||
else
|
||||
render json: {error: I18n.t("login.not_activated"), reason: 'not_activated', sent_to_email: @user.email_logs.where(email_type: 'signup').order('created_at DESC').first.try(:to_address), current_email: @user.email}
|
||||
render json: {
|
||||
error: I18n.t("login.not_activated"),
|
||||
reason: 'not_activated',
|
||||
sent_to_email: @user.email_logs.where(email_type: 'signup').order('created_at DESC').first.try(:to_address) || @user.email,
|
||||
current_email: @user.email
|
||||
}
|
||||
return
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user