Modified authentication with user_signed_in? and current_user
This commit is contained in:
@@ -1,23 +1,19 @@
|
||||
<p style="color: green"><%= notice %></p>
|
||||
|
||||
<p>Signed as <%= Current.user.email %></p>
|
||||
|
||||
<h2>Login and verification</h2>
|
||||
|
||||
<div>
|
||||
<%= link_to "Change password", edit_password_path %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= link_to "Change email address", edit_identity_email_path %>
|
||||
</div>
|
||||
|
||||
<h2>Access history</h2>
|
||||
|
||||
<div>
|
||||
<%= link_to "Devices & Sessions", sessions_path %>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<%= button_to "Log out", Current.session, method: :delete %>
|
||||
<% if user_signed_in? %>
|
||||
<p>Signed as <%= current_user.email %></p>
|
||||
<h2>Login and verification</h2>
|
||||
<div>
|
||||
<%= link_to "Change password", edit_password_path %>
|
||||
</div>
|
||||
<div>
|
||||
<%= link_to "Change email address", edit_identity_email_path %>
|
||||
</div>
|
||||
<h2>Access history</h2>
|
||||
<div>
|
||||
<%= link_to "Devices & Sessions", sessions_path %>
|
||||
</div>
|
||||
<br>
|
||||
<%= button_to "Log out", Current.session, method: :delete %>
|
||||
<% else %>
|
||||
<%= link_to "Log in", sign_in_path %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user