mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FIX: use 'request.remote_ip' instead of 'request.ip' for better consistency
This commit is contained in:
parent
a799f6f8d9
commit
1ec73b5ba0
1 changed files with 3 additions and 8 deletions
|
@ -605,17 +605,12 @@ class UsersController < ApplicationController
|
|||
return false if is_api?
|
||||
|
||||
params[:password_confirmation] != honeypot_value ||
|
||||
params[:challenge] != challenge_value.try(:reverse)
|
||||
params[:challenge] != challenge_value.try(:reverse)
|
||||
end
|
||||
|
||||
def user_params
|
||||
params.permit(
|
||||
:name,
|
||||
:email,
|
||||
:password,
|
||||
:username,
|
||||
:active
|
||||
).merge(ip_address: request.ip, registration_ip_address: request.ip)
|
||||
params.permit(:name, :email, :password, :username, :active)
|
||||
.merge(ip_address: request.remote_ip, registration_ip_address: request.remote_ip)
|
||||
end
|
||||
|
||||
def fail_with(key)
|
||||
|
|
Loading…
Reference in a new issue