forked from hotsh/rstat.us
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added forgot password view and email template
Added forgot password sent dat to user model
- Loading branch information
Showing
6 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,14 @@ def self.send_signup_notification(recipient, token) | |
:body => render_haml_template("signup", {:token => token}), | ||
:via => :smtp, :via_options => Rstatus::PONY_VIA_OPTIONS) | ||
end | ||
|
||
def self.send_forgot_password_notification(recipient, token) | ||
Pony.mail(:to => recipient, | ||
:subject => "Reset your rstat.us password", | ||
:from => "[email protected]", | ||
:body => render_haml_template("forgot_password", {:token => token}), | ||
:via => :smtp, :via_options => Rstatus::PONY_VIA_OPTIONS) | ||
end | ||
|
||
private | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
%h2 Forgot Password | ||
|
||
%p Just provide us with the email address on your account and we will send you an email with a link to reset your password. | ||
|
||
%form{:action => "/forgot_password", :method => "POST"} | ||
%label{:for => "email" } Email: | ||
%input{:type => "text", :name => "email", :id => "email"} | ||
%br/ | ||
%input{:type => "submit", :value => "Send "} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
To reset your password for rstat.us please click on the link below. | ||
|
||
http://rstat.us/reset_password/#{token} | ||
|
||
Please be aware that this link will only be valid for 2 days. | ||
|
||
\- The rstat.us site Robot |