diff --git a/app/views/users/shared/_links.html.erb b/app/views/users/shared/_links.html.erb index 11b16ffd5..1d520d0f6 100644 --- a/app/views/users/shared/_links.html.erb +++ b/app/views/users/shared/_links.html.erb @@ -17,7 +17,7 @@ <%= link_to t("devise.links.not_receive_confirmation"), new_confirmation_path(resource_name) %>
<% end -%> - <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %> + <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' && flash[:alert] == t('devise.failure.locked') %> <%= link_to t("devise.links.not_receive_unlock"), new_unlock_path(resource_name) %>
<% end -%>