some mods for emailer url
This commit is contained in:
parent
c30348f17e
commit
2db0789e46
|
@ -5,12 +5,15 @@ class ResetCPanelPasswordMailer < ActionMailer::Base
|
|||
email = user.email
|
||||
@reset_token = user.reset_token
|
||||
@user_id = user.id
|
||||
@url = "http://#{request.host_with_port}/cpanel/reset_password?id=#{@user_id}&token=#{@reset_token}"
|
||||
mail(:to => email, :subject => "Reset Password Instructions")
|
||||
end
|
||||
|
||||
def send_user_confirmation(user)
|
||||
@confirmation_token = user.confirmation_token
|
||||
@user_id = user.id
|
||||
confirm_email
|
||||
@url = "http://#{request.host_with_port}/cpanel/confirm_email?id=#{@user_id}&token=#{@confirmation_token}"
|
||||
mail(:to => user.email, :subject => "Orbit - Confirm Email")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<p>Please Reset your password with the following instructions</p>
|
||||
|
||||
<%= link_to 'Click here to reset', "http://#{request.host_with_port}/cpanel/reset_password?id=#{@user_id}&token=#{@reset_token}" %>
|
||||
<%= link_to 'Click here to reset', @url %>
|
|
@ -1,3 +1,3 @@
|
|||
<p>Please confirm email by clicking on the link.</p>
|
||||
|
||||
<%= link_to 'Click here to confirm', "http://#{request.host_with_port}/cpanel/reset_password?id=#{@user_id}&token=#{@reset_token}" %>
|
||||
<%= link_to 'Click here to confirm', @url %>
|
Loading…
Reference in New Issue