Made user profile page show hostname of user's IP address.

This commit is contained in:
Logan Fick
2017-11-24 22:01:37 -05:00
parent 12baf8d5d7
commit 8796b3a415
2 changed files with 7 additions and 1 deletions

View File

@@ -22,6 +22,12 @@ class UsersController < ApplicationController
flash.now[:alert] = "An error occured while checking if this user is banned from the server!"
@ban_json = nil
end
begin
@hostname = Resolv.new.getname(@user.last_ip)
rescue
@hostname = "No hostname found."
end
end
# SIGNUP