<% content_for :email_body do %>

  <p>Hey <%= @resource.username %>!</p>

  <p>Someone has requested a link to change your password, and you can do this through the link below.</p>

  <p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>

  <p>If you didn't request this, please ignore this email.</p>
  <p>Your password won't change until you access the link above and create a new one.</p>

<% end %>

<%= render template: "layouts/email" %>


<% content_for :email_body do %>

  <p>Hey <%= @resource.username %>!</p>

  <p>Someone has requested a link to change your password, and you can do this through the link below.</p>

  <% if (@resource.active) %>
    <p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
  <% else %>
    <p><%= link_to 'Set up my account', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token, msg: 'welcome') %></p>
  <% end %>

  <p>If you didn't request this, please ignore this email.</p>
  <p>Your password won't change until you access the link above and create a new one.</p>

<% end %>

<%= render template: "layouts/email" %>


Send a different password reset link when the user is not active yet.
Send a different password reset link when the user is not active yet.
