diff options
author | jomo <github@jomo.tv> | 2016-06-21 23:41:04 +0200 |
---|---|---|
committer | jomo <github@jomo.tv> | 2016-06-21 23:41:04 +0200 |
commit | 81d9fabe7bf2d8249402dea99871ea0a8897f746 (patch) | |
tree | 21baf6d753ab93fe6be2f77290dea75934955b28 | |
parent | e0ac5fac131342874c4e9f814a5943f38a39fa91 (diff) |
allow mods to resend confirmation emails for other users
-rw-r--r-- | app/controllers/users_controller.rb | 2 | ||||
-rw-r--r-- | app/views/users/show.html.erb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index bd511df..db46cd8 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -139,7 +139,7 @@ class UsersController < ApplicationController end def resend_mail - if @user.is?(current_user) && !confirmed? + if (@user.is?(current_user) || mod) && !confirmed? RedstonerMailer.register_mail(@user, false).deliver_now flash[:notice] = "Check your inbox for the confirmation mail." else diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 0a5431c..e371a09 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -21,7 +21,7 @@ <% end %> <% 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> <%= 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 %> |