fix: Fix get current user in app template (#10844)

pull/10875/head
Qwerty5Uiop 2 months ago committed by GitHub
parent e162362431
commit 2c17f34409
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex

@ -94,7 +94,7 @@
</div> </div>
<% end %> <% end %>
<% end %> <% end %>
<% session = Explorer.Account.enabled?() && Plug.Conn.get_session(@conn, :current_user) %> <% session = Explorer.Account.enabled?() && Map.get(@conn.private, :plug_session) && Plug.Conn.get_session(@conn, :current_user) %>
<%= render BlockScoutWeb.LayoutView, "_topnav.html", current_user: session, conn: @conn %> <%= render BlockScoutWeb.LayoutView, "_topnav.html", current_user: session, conn: @conn %>
<%= if session && !session[:email_verified] do %> <%= if session && !session[:email_verified] do %>
<p class="alert alert-warning" role="alert" style="margin-bottom: 0"><%= gettext("Please confirm your email address to use the My Account feature.") %> <%= gettext("A confirmation email was sent to") %> <a href="mailto:<%= session[:email] %>"><%=session[:email] %></a> <%= gettext "on sign up. Didn’t receive?" %> <a href="/api/account/v2/email/resend" class="ajax"><%= gettext "Resend verification email" %></a>.</p> <p class="alert alert-warning" role="alert" style="margin-bottom: 0"><%= gettext("Please confirm your email address to use the My Account feature.") %> <%= gettext("A confirmation email was sent to") %> <a href="mailto:<%= session[:email] %>"><%=session[:email] %></a> <%= gettext "on sign up. Didn’t receive?" %> <a href="/api/account/v2/email/resend" class="ajax"><%= gettext "Resend verification email" %></a>.</p>

Loading…
Cancel
Save