allow mods to resend confirmation emails for other users
This commit is contained in:
@@ -139,7 +139,7 @@ class UsersController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def resend_mail
|
def resend_mail
|
||||||
if @user.is?(current_user) && !confirmed?
|
if (@user.is?(current_user) || mod) && !confirmed?
|
||||||
RedstonerMailer.register_mail(@user, false).deliver_now
|
RedstonerMailer.register_mail(@user, false).deliver_now
|
||||||
flash[:notice] = "Check your inbox for the confirmation mail."
|
flash[:notice] = "Check your inbox for the confirmation mail."
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if !@user.confirmed? %>
|
<% if !@user.confirmed? %>
|
||||||
<% if @user.is?(current_user) %>
|
<% if @user.is?(current_user) || mod? %>
|
||||||
<span class="user-unconfirmed">Please confirm your email <u><%= @user.email %></u> !</span>
|
<span class="user-unconfirmed">Please confirm your email <u><%= @user.email %></u> !</span>
|
||||||
<%= button_to "Resend the confirmation mail", resend_mail_user_path, class: "btn dark", form_class: "inline-block", data: {confirm: "Did you check your spam folder?"} %>
|
<%= button_to "Resend the confirmation mail", resend_mail_user_path, class: "btn dark", form_class: "inline-block", data: {confirm: "Did you check your spam folder?"} %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|||||||
Reference in New Issue
Block a user