Merge branch 'master' of https://github.com/Futseh/redstoner.com
This commit is contained in:
@@ -138,6 +138,12 @@ class UsersController < ApplicationController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def resend_mail
|
||||||
|
RedstonerMailer.register_mail(@user, false).deliver_now
|
||||||
|
flash[:notice] = "Check your inbox for the confirmation mail."
|
||||||
|
redirect_to users_path(@user)
|
||||||
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
if (mod? && current_user.role >= @user.role ) || (@user.is?(current_user) && confirmed?)
|
if (mod? && current_user.role >= @user.role ) || (@user.is?(current_user) && confirmed?)
|
||||||
if mod?
|
if mod?
|
||||||
@@ -344,4 +350,4 @@ class UsersController < ApplicationController
|
|||||||
a = [:ign, :email, :password, :password_confirmation, :mail_own_thread_reply, :mail_other_thread_reply, :mail_own_blogpost_comment, :mail_other_blogpost_comment, :mail_mention] + add
|
a = [:ign, :email, :password, :password_confirmation, :mail_own_thread_reply, :mail_other_thread_reply, :mail_own_blogpost_comment, :mail_other_blogpost_comment, :mail_mention] + add
|
||||||
params.require(:user).permit(a)
|
params.require(:user).permit(a)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -44,4 +44,4 @@ class RedstonerMailer < ActionMailer::Base
|
|||||||
@user = user
|
@user = user
|
||||||
mail(to: @user.email, subject: "Email change on Redstoner.com")
|
mail(to: @user.email, subject: "Email change on Redstoner.com")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
<% if !@user.confirmed? %>
|
<% if !@user.confirmed? %>
|
||||||
<% if @user.is?(current_user) %>
|
<% if @user.is?(current_user) %>
|
||||||
<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 red" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span class="user-unconfirmed">This user hasn't confirmed their email yet!</span>
|
<span class="user-unconfirmed">This user hasn't confirmed their email yet!</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -107,4 +108,4 @@
|
|||||||
<% else %>
|
<% else %>
|
||||||
<%= render_md(@user.about).html_safe %>
|
<%= render_md(@user.about).html_safe %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ Redstoner::Application.routes.draw do
|
|||||||
member do
|
member do
|
||||||
get 'confirm'
|
get 'confirm'
|
||||||
get 'edit_login'
|
get 'edit_login'
|
||||||
|
post 'resend_mail'
|
||||||
get 'edit_notifications'
|
get 'edit_notifications'
|
||||||
put 'update_login'
|
put 'update_login'
|
||||||
end
|
end
|
||||||
@@ -51,4 +52,4 @@ Redstoner::Application.routes.draw do
|
|||||||
get '/dmca' => redirect('https://www.youtube.com/watch?v=oHg5SJYRHA0')
|
get '/dmca' => redirect('https://www.youtube.com/watch?v=oHg5SJYRHA0')
|
||||||
|
|
||||||
root to: 'statics#index'
|
root to: 'statics#index'
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user