mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
Don't update the current ip to an empty string
This commit is contained in:
parent
60ccb5ecf5
commit
74220b4194
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ module CurrentUser
|
||||||
@not_logged_in = session[:current_user_id].blank?
|
@not_logged_in = session[:current_user_id].blank?
|
||||||
if @current_user
|
if @current_user
|
||||||
@current_user.update_last_seen!
|
@current_user.update_last_seen!
|
||||||
if @current_user.ip_address != request.remote_ip
|
if (@current_user.ip_address != request.remote_ip) and request.remote_ip.present?
|
||||||
@current_user.ip_address = request.remote_ip
|
@current_user.ip_address = request.remote_ip
|
||||||
@current_user.update_column(:ip_address, request.remote_ip)
|
@current_user.update_column(:ip_address, request.remote_ip)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue