Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Logs Successful and Attempted Logins on your Rails App
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
generators/login_logger_migration
lib
tasks
test
MIT-LICENSE
README
Rakefile
init.rb
install.rb
uninstall.rb

README

LoginLogger v0.1
===========

Login Logger logs any login activity on your site to a table in your database, and also helps protect against abuse, 
by letting you monitor failed logins.

To get started:

1. script/generate login_logger_migration
2. rake db:migrate

This sets up the login_logs table in your DB.

3. Add to your SessionsController

include LoginLogger
after_filter :log_login, :only => 'create'

Add this to your User Model:

is_loggable


Example
===========

Now you can do things like:

Last Time a user logged in:
--
current_user.login_logs.last

Failed Logins in last ten minutes:
--
LoginLog.failed.last_ten_minutes



Copyright (c) 2009 Scott Miller, released under the MIT license
Something went wrong with that request. Please try again.