fixes #85: Emailed message of Password Reset Request
This commit is contained in:
@@ -121,10 +121,6 @@ cd /home/danbooru
|
||||
sudo -u danbooru mkdir /home/danbooru/apps
|
||||
git clone git://github.com/r888888888/danbooru.git danbooru
|
||||
chown -R danbooru:danbooru danbooru
|
||||
cap deploy:setup
|
||||
cap deploy:update_code
|
||||
cap deploy:migrate
|
||||
chown danbooru:danbooru /var/www/danbooru/shared/log/development.log
|
||||
|
||||
echo
|
||||
echo
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
<p>The password for the user "<%= @user.name %>" for the website <%= Danbooru.config.app_name %> has been reset. It is now <code><%= @new_password %></code>.</p>
|
||||
|
||||
<p>Please log in to the website and <%= link_to "change your password", edit_user_path(@user) %> as soon as possible.</p>
|
||||
<p>Please log in to the website and <%= link_to "change your password", edit_user_path(@user, :host => Danbooru.config.hostname) %> as soon as possible.</p>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<h1>Password Reset Request</h1>
|
||||
|
||||
<p>Someone has requested that the password for "<%= @user.name %>" for the website <%= Danbooru.config.app_name %> be reset. If you did not request this, then you can ignore this email.</p>
|
||||
<p>To reset your password, please visit <%= link_to "this link", edit_maintenance_user_password_reset_path(:key => @nonce.key, :email => @nonce.email) %>.</p>
|
||||
<p>To reset your password, please visit <%= link_to "this link", edit_maintenance_user_password_reset_path(:host => Danbooru.config.hostname, :key => @nonce.key, :email => @nonce.email) %>.</p>
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
<tbody>
|
||||
<% User.find(:all, :conditions => ["level >= ?", CONFIG["user_levels"]["Test Janitor"]], :order => "level, name").each do |user| %>
|
||||
<tr>
|
||||
<td><%= h user.name %></td>
|
||||
<td><%= h user.pretty_level %></td>
|
||||
<td><%= link_to user.name, user_path(user, :host => Danbooru.config.hostname) %></td>
|
||||
<td><%= user.pretty_level %></td>
|
||||
<td style="text-align: right;"><%= Post.count(:conditions => ["created_at >= ? AND approver_id = ?", 1.days.ago, user.id]) %>/<%= Post.count(:conditions => ["created_at >= ? AND (approver_id IS NOT NULL OR status = 'pending')", 1.days.ago]) %></td>
|
||||
<td style="text-align: right;"><%= Post.count(:conditions => ["created_at >= ? AND approver_id = ?", 7.days.ago, user.id]) %>/<%= Post.count(:conditions => ["created_at >= ? AND (approver_id IS NOT NULL OR status = 'pending')", 7.days.ago]) %></td>
|
||||
<td style="text-align: right;"><%= Post.count(:conditions => ["created_at >= ? AND approver_id = ?", 14.days.ago, user.id]) %>/<%= Post.count(:conditions => ["created_at >= ? AND (approver_id IS NOT NULL OR status = 'pending')", 14.days.ago]) %></td>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
require 'socket'
|
||||
|
||||
module Danbooru
|
||||
class Configuration
|
||||
# The version of this Danbooru.
|
||||
@@ -10,6 +12,11 @@ module Danbooru
|
||||
"Danbooru"
|
||||
end
|
||||
|
||||
# The hostname of the server.
|
||||
def hostname
|
||||
Socket.gethostname
|
||||
end
|
||||
|
||||
# Contact email address of the admin.
|
||||
def contact_email
|
||||
"webmaster@#{server_host}"
|
||||
|
||||
Reference in New Issue
Block a user