Add a link that allows you to send activation email again

This commit is contained in:
Neil Lalonde
2013-02-22 11:49:48 -05:00
parent 45ab3ab892
commit ff3e012034
11 changed files with 106 additions and 3 deletions

View File

@ -292,6 +292,16 @@ class UsersController < ApplicationController
render :layout => 'no_js'
end
def send_activation_email
@user = fetch_user_from_params
@email_token = @user.email_tokens.unconfirmed.active.first
if @user
@email_token = @user.email_tokens.create(email: @user.email) if @email_token.nil?
Jobs.enqueue(:user_email, type: :signup, user_id: @user.id, email_token: @email_token.token)
end
render nothing: true
end
def search_users
term = params[:term].to_s.strip
topic_id = params[:topic_id]