don't interact with inactive users
This commit is contained in:
parent
6d091ef204
commit
3241f34f75
|
@ -9,7 +9,8 @@
|
|||
<% end %>
|
||||
<%= @showing_user.username %>
|
||||
</span>
|
||||
<% if @user %>
|
||||
|
||||
<% if @user && @showing_user.is_active? %>
|
||||
(<a href="/messages?to=<%= @showing_user.username %>">Send a Message</a>)
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -44,7 +44,8 @@ EMAIL_WIDTH = 72
|
|||
LAST_STORY_KEY = "mailing:last_story_id"
|
||||
LAST_COMMENT_KEY = "mailing:last_comment_id"
|
||||
|
||||
mailing_list_users = User.where(:mailing_list_enabled => true)
|
||||
mailing_list_users = User.where(:mailing_list_enabled => true).select{|u|
|
||||
u.is_active? }
|
||||
|
||||
last_story_id = (Keystore.value_for(LAST_STORY_KEY) || Story.last.id).to_i
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ end
|
|||
sending_user = User.where(:mailing_list_enabled => true,
|
||||
:mailing_list_token => user_token).first
|
||||
|
||||
if !sending_user
|
||||
if !sending_user || !sending_user.is_active?
|
||||
STDERR.puts "no user with mailing list token #{user_token}"
|
||||
|
||||
# if this looks like a user token but invalid, generate a bounce to be
|
||||
|
|
Loading…
Reference in a new issue