users = User.all
users = users.where(:status => @params[:status]) if @params[:status]
- users = users.where(:creation_ip => @params[:ip]) if @params[:ip]
+ users = users.where(:creation_address => @params[:ip]) if @params[:ip]
@users_count = users.limit(501).count
@users_count = I18n.t("count.at_least_pattern", :count => 500) if @users_count > 500
def save_new_user(email_hmac, referer = nil)
current_user.data_public = true
current_user.description = "" if current_user.description.nil?
- current_user.creation_ip = request.remote_ip
current_user.creation_address = request.remote_ip
current_user.languages = http_accept_language.user_preferred_languages
current_user.terms_agreed = Time.now.utc
</td>
<td>
<p>
- <% if user.creation_ip %>
+ <% if user.creation_address %>
<%= t "users.index.summary_html",
:name => link_to(user.display_name, user),
- :ip_address => link_to(user.creation_ip, :ip => user.creation_ip),
+ :ip_address => link_to(user.creation_address, :ip => user.creation_address),
:date => l(user.created_at, :format => :friendly) %>
<% else %>
<%= t "users.index.summary_no_ip_html",
<dl class="list-inline">
<dt class="list-inline-item m-0"><%= t ".email address" %></dt>
<dd class="list-inline-item"><%= @user.email %></dd>
- <% unless @user.creation_ip.nil? -%>
+ <% unless @user.creation_address.nil? -%>
<dt class="list-inline-item m-0"><%= t ".created from" %></dt>
- <dd class="list-inline-item"><%= link_to @user.creation_ip, users_path(:ip => @user.creation_ip) %></dd>
+ <dd class="list-inline-item"><%= link_to @user.creation_address, users_path(:ip => @user.creation_address) %></dd>
<% end -%>
<dt class="list-inline-item m-0"><%= t ".status" %></dt>
<dd class="list-inline-item"><%= link_to @user.status.capitalize, users_path(:status => @user.status) %></dd>
:status => %w[suspended deleted],
:creation_time => Time.now.utc - 28.days..Time.now.utc
},
- :group => :creation_ip
+ :group => :creation_address
)
addresses.each do |address, count|
moderator_user = create(:moderator_user)
administrator_user = create(:administrator_user)
_suspended_user = create(:user, :suspended)
- _ip_user = create(:user, :creation_ip => "1.2.3.4")
+ _ip_user = create(:user, :creation_address => "1.2.3.4")
# There are now 7 users - the five above, plus two extra "granters" for the
# moderator_user and administrator_user