Log the IP address used to create an account.

This commit is contained in:
Tom Hughes 2008-10-12 23:20:28 +00:00
parent caa20ccc40
commit 2ccbc55236
2 changed files with 10 additions and 0 deletions

View file

@ -16,6 +16,7 @@ class UserController < ApplicationController
@user.visible = true
@user.data_public = true
@user.description = "" if @user.description.nil?
@user.creation_ip = request.remote_ip
if @user.save
flash[:notice] = "User was successfully created. Check your email for a confirmation note, and you\'ll be mapping in no time :-)<br>Please note that you won't be able to login until you've received and confirmed your email address."

View file

@ -0,0 +1,9 @@
class AddCreationIp < ActiveRecord::Migration
def self.up
add_column "users", "creation_ip", :string
end
def self.down
remove_column "users", "creation_ip"
end
end