our thoughts

Stephen coded up a little plugin a while ago so I thought I’d share it with everyone.

Login Logger keeps track of recent logins to Wordpress for all users, as well as all failed logins. It records username, time, IP address and how long since each login attempt as well as time since last active for each user. These tables can be accessed from the Users menu, and the list of failed logins can be cleared at any time.

It was mainly written quickly for personal use – so we can’t make any claims regarding its safety or extendibility (it does not use any localization methods, etc) but please let us know if you find it useful!

Download it here:
Wordpress 2.5 – 2.8.4
Wordpress 2.2 – 2.5

To install, unzip and upload the entire folder to your plugins folder, then activate from the plugin menu.

Updates:

August 28, 2009: Updated styling
April 10, 2008: Updated for Wordpress 2.5.
January 24, 2008: Fixed another minor wp prefix bug.
October 2, 2007: Fixed the wp prefix bug and submenu path bug.

your thoughts

[...] Thanks for visiting! If you’re new here, you may want to subscribe to my RSS feed. This blog posts regular Wordpress news, updates of themes, plugins, ideas, hacks, quick fixes and everything about blogging, especially with Wordpress. Go ahead, subscribe to our feed!Login Logger keeps track of recent logins to Wordpress for all users, as well as all failed logins. It records username, time, IP address and how long since each login attempt as well as time since last active for each user. [...]

[...] Visit [...]

[...] Login Logger (tags: wordpress plugin) [...]

Jake Johnson

July 5 2007

Thank you,

this plugin will be used on our many wordpress sites to keep track of our authors.

-Jake

Choder

July 6 2007

Love it, I have been looking for this for a long time. Thanks

larry

July 7 2007

looks good to me! Thanks!

design for myspace

July 9 2007

Thanks for the plugin it should be very helpful.

ciken

July 12 2007

good info…thanks…

Aaron

July 13 2007

Nice one! got it working already!

[...] Login Logger [...]

Gill

July 15 2007

Where can I find the admin panel for it? I’ve installed it successfully, but I can’t find it Manage or Options.

Stephen

July 16 2007

Hi Gill – its in the ‘Users’ menu.

vlp

July 19 2007

Doesn’t anybody test this plugin with Wordpress 2.0.10? I tried to activate the plugin but I didn’t find any option anywhere.

[...] Wordpress plugin: Login Logger – Keep tabs on your users/authors. Login Logger v 0.1 keeps track of recent logins to Wordpress for all users, as well as all failed logins. It records username, time, IP address and how long since each login attempt as well as time since last active for each user. These tables can be accessed from the Users menu, and the list of failed logins can be cleared at any time. [...]

[...] The Login Logger WordPress plugin sounds a great idea and it works fine with standard situations. However, go beyond these and things start to go awry. An example is where you have to use unique database table prefixes because you use shared hosting. This is certainly something that I do and it breaks Login Logger. Thankfully, the fix for this is easy enough: just amend the database query on line 22 in the manage.php file as follows: [...]

moby

July 29 2007

Does not display a manage function in Users using WP 2.0.x

Sjebo

August 1 2007

Hi! Thanks for the plugin, I was looking for something like this! Only one feature request. Can you log ‘last visit to site’ as well? That would be nice!

wordpress quickstart guy

August 12 2007

hey, this is a cool plugin. Thanks for sharing especially if my site is access by more than one person.

yup i would also like to request for last visitor.

[...] 156) Login Logger [...]

Bollywood Blog

September 11 2007

I upgraded to WP 2.2.3 and suddenly the menu link was not working. So i go through the code and changed the following function.

function loginlog_users()
{
add_submenu_page(‘index.php’,'Login Logs’,'Last Logins’,8,’loginlog/manage.php’);
}

Removed the full path from the last parameter and everything goes back to normal operation.

Robert

September 14 2007

damn :)

i found out the same thing in approx one hour….
maybe i should have take a look on this site…. :)
but it works!
it’ll work also with

add_submenu_page(’index.php’,’Login Logs’,’Last Logins’,8,’../wp-content/plugins/loginlog/manage.php’);

so whatever ….
good plugin anyway!

[...] 156) Login Logger [...]

moby

September 20 2007

Same problem here w/V2.2.3. Tweaked as listed above and works again now!

dan

September 24 2007

hi! I just noticed that it will only work on tables with the default prefix (“wp_”).

Around line 21 on the manage.php, “wp_users” is referenced explicitly. I added a variable name on top of that line to reference it to $wpdb->prefix . ‘users’ instead.

But still a very useful plugin. Thanks!

Stephen

October 1 2007

The hardcoded wp_ is now fixed. The menu should now show up in 2.0.x as well as 2.2.3 onwards.

[...] Login Logger The plugin will log information concerning logins to your WordPress. [...]

Danny

October 12 2007

I love this plugin. I have a couple things to ask, though.

1. Could you make an option so that I can choose to not delete the database tables when I deactivate the plugin. I was surprised ot see all my data gone when I came back after bug checking another issue, where i deactivated all my plugins.

2. I would love it if you would expand this plugin to show all content (posts, comments, pages) that have been updated since the lats visit by a visitor who logs in. But it seems a little out of the scope, eh? I might do this myself, but I’d need the plugin to not erase the db records when deactivated, as mentioned above.

3. Just installed v. 1.1 (thanks for fixing the 404 error I was getting when trying to call up the management page). Now though, with no records (see above) I am getting the following error on the management page, under Last logins:

WordPress database error: [Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '=']
SELECT distinct wp_users.user_login,wp_loginlog.username FROM wp_users LEFT OUTER JOIN wp_loginlog ON wp_users.user_login = wp_loginlog.username WHERE wp_loginlog.username IS NULL

I don’t know what that means. Have I done something wrong? I am using WP 2.3.

Thank you for listening, and for the plugin.

[...] 安装一些安全方面的插件 比如有WordPress Database Backup、Akismet 、Instant Upgrade 、WordPress Version Check 、WordPress Scanner、Admin SSL 、Login Logger等等 本文Tags: Wordpress 本文被读:27 [...]

aditya

October 25 2007

when i install and activate its saying Database error
user.wp-logs table not found

forum

October 30 2007

Thanks for the plugin

jill0001

October 31 2007

是吗?这样也可以反应釜

larry

November 9 2007

Great plugin! I started using it with version 2.1 and upgraded to 2.3. It stopped working after that, I am now downloading the newest version and hopefully that one will work.
Thanks!

larry

Demian

November 11 2007

WordPress database error: [Table 'overdosse_wordpress.as_wp_loginlog' doesn't exist]
UPDATE as_wp_loginlog SET active = ‘2007-11-11 15:13:37′ WHERE username = ‘admin’

WHYY????

Junipingla

November 14 2007

Wow!!! Been looking for this one!! I know many who needs this plugin!
However I get a bunch of N/A’s. Is it because I just installed the plugin?? I use WP 2.3.1

Could you maybe, in the future implent to display how many comments the members have done?

huh

November 18 2007

I keep getting this error, what to do??

The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay

Lance Homer

November 30 2007

I’m not sure if this is a bug or just how it works, but in the failed logins section it show every user name as Array. I’d like to know which user name was tried rather than just a generic “Array”. It looks like a bug in the script:

Username Time IP How Long Ago
Array 2007-11-30 21:06:11 71.36.73.221 48 min 37 sec
Array 2007-11-30 20:41:51 168.103.141.240 1 hour 12 min
Array 2007-11-30 18:39:20 128.187.0.178 3 hours 15 min
Array 2007-11-30 17:27:45 157.201.184.242 4 hours 27 min

[...] Login Logger –cu ajutorul acestui plugin poţi monitoriza cat de des utilizatorii blogului întră în partea administrativă şi de asemeni care utilizatori întâmpină probleme la autentificare. (un mic secret: cel mai des uită parola domnul vultoor când ajunge timpul să se autentifice pe blogul blogosferei) [...]

[...] 209 Login Logger Siteye giriş yapan üyeleri listeler. [...]

[...] 安装一些安全方面的插件 比如有WordPress Database Backup、Akismet 、Instant Upgrade 、WordPress Version Check 、WordPress Scanner、Admin SSL 、Login Logger等等 [...]

pele

December 31 2007

I tried the plugin on my blog with wordpress 2.3, it didn’t work.

Tom

January 4 2008

Can’t locate the tab menu when installed on Wordpress Version 2.3.2

What should I do?

THank you.

Jason

January 23 2008

I too am having a problem with this and 2.3.2. Clicking on Users -> Login Logs results in a blank page (I’ve been able to check for output errors yet).

Further, a look in the database shows that there are no entries, so it appears as though something changed in 2.3.2 which causes problems with this plugin.

rachelcunliffe

January 23 2008

We’ve just tested this in 2.3.2 and it works fine for us.

When you say you got a blank page, does that mean an actual blank page, or just no logins yet in the table?

Jason

January 25 2008

The page is physically blank, as in a there is no output if I look at the source.

The manage file does in fact exist where the plugin is looking for it (/wp-admin/loginlog/manage.php), but nothing is displayed.

[...] Login Logger Siteye giriş yapan üyeleri [...]

Stephen

January 28 2008

Hi Jason,

It looks like you’ve unzipped both the loginlog.php and manage.php files directly into the plugins folder rather than keeping them in the loginlog folder. They’ll both need to be in a loginlog folder (provided in the zip) to work correctly.

Norberto Kawakami

February 13 2008

Hi,
i’ve made some alterations in your plugin to keep track of the same user login.
I’ve made lines 71, 72, 73 and 74 to comments.
This change can show me if there is some intruder in my blog that have not altered my password….

Norberto Kawakami

February 13 2008

oops…
lines 71, 72, 73 and 74 from file loginlog.php

[...] Pesquisando um pouco no Google, encontrei um plugin que faz exatamente isto: Login Logger v0.1. [...]

[...] Login Logger – Anotando todos os logins efetuados no painel de administração do blog. [...]

ll

March 4 2008

Could you add an extra function that allows you to delete inactive users?

rachelcunliffe

March 5 2008

I would probably prefer people still going to the Users tab and manually deleting them from there. If you see there’s no recent logins, then you might want to contact the person first?

ll

March 9 2008

Too much work. there are literally thousands of inactive users with no logins for months. It takes the plugin forever to display the log. I tried searching for a bulk deleter, but no luck. So figure this is the best option for me.

[...] Login Logger. Recopila información acerca de los intentos de login más recientes realizados por los usuarios, así como de los intentos fallidos que se han producido. [...]

Danny

March 22 2008

Hello,

I like the plugin, but it looks the plugin doesn’t log the returning users who have checked the “remember me” checkbox at the login form.
Is it possible to log these users as well, without them having to log in each time?

Greets,

Danny

Chris

April 8 2008

I’m using 2.5 and there seems to be some issue going on. When logged out and you login again, I get logged in the failed area. Other users have logged and they too are just showing up under the failed area. Sometimes if I clear the failed logins the users that were under failed disappear form the last login area. Weird.

baron

April 8 2008

hi there.com plugin but :

Does anybody know if tis script is compatible with Wordpress 2.5?

Thanks in advance for any help on this!

turkbaron

Chris

April 9 2008

Thanks Rachel,

I really enjoy the plugin and am glad it’s not being abandoned like many others lately.

Stephen

April 9 2008

Hi Chris,

I installed the plugin on a newly installed 2.5 blog and didn’t seem to have any problems. It did use some deprecated functions however, so I’ve updated it to work in another way – can you see if it works for you now?

[...] Login Logger – Anotando todos os logins efetuados no painel de administração do blog. [...]

[...] Login Logger. Reune informação sobre as tentativas de login mais recentes, assim como das tentativas mal-sucedidas. Leia também: Faça backup completo do blog com o BlogBackupr [...]

[...] possible plugin that I have tried is loginlogger. This keeps a track of when people have logged in. I was hoping it did a bit more but that is all. [...]

Darkraisin

June 6 2008

Hi

seems to be the one I was looking for. Thanks for putting it up. I will DL and install it soon.

BTW, can it be altered in such a way that records from which country users has logged in and if the same user has logged in from different country in (in certain interval of time but this is not so important) an email would be sent to the administrator with the detail, or just being recorded in another table or column?

Haa, that would be cool. But let me first try to install this one first.

Regards

Darkraisin

[...] Login Logger – Plugin que mostra todas as tentativas de login sem sucesso, além de mostrar quem está logado no momento. Para os casos em que a invasão ocorre sem a alteração da senha do administrador do blog. [...]

şapkacı

July 23 2008

It looks like you’ve unzipped both the loginlog.php and manage.php files directly into the plugins folder rather than keeping them in the loginlog folder. They’ll both need to be in a loginlog folder (provided in the zip) to work correctly.

promosyon

July 24 2008

I tried the plugin on my blog with wordpress 2.3, it didn’t work.

toys

July 29 2008

hmmm… I’m not sure if I quite understand how this plugin adds value, from a truly practical perspective. Is it to help to see if someone is trying to hack into your website? Or, if someone else is logging in? I guess it would be useful if you suspected anything, but otherwise it doesn’t carry much use to me in my mind. However, I will keep it in mind if I ever suspect something’s going awry with who’s logging into my site.

[...] Login Logger Log the most recent successful login for each user, as well as all unsuccessful logins [...]

[...] Login Logger Siteye giriş yapan üyeleri [...]

iş elbiseleri

August 15 2008

I tried the plugin on my blog with wordpress 2.3, it didn’t work.

Promosyon şapka

August 15 2008

Login Logger – Anotando todos os logins efetuados no painel de administração do blog.

Jenny

August 25 2008

I tried to activate this plugin, but it doesn’t show up in the plugin-activation list in Wordpress, and I kept both files in the loginlog folder. Any ideas? I really could use this information in my database.

Thanks!

Richard Tape

September 15 2008

Hey!

Nice idea fora plugin. Just a quick note that it doesn’t seem to work in 2.6. Doesn’t appear to create the mysql table correctly which is a real shame… any chance of an update at all? I’m sure there’s plenty of people who would love this plugin…I’ll help if I can…

[...] © Login Logger Siteye giriş yapan üyeleri [...]

Stephen

October 15 2008

Hi Richard,

It looks like the last time I uploaded the plugin I forgot to zip the actual loginlog folder – which I’ve updated. If you put both files in a loginlog folder in the plugins directory it should work – have tested this on a fresh 2.6 install.

etegration

November 9 2008

This works fine with 2.7-beta1 too. Thanks for this plugin.

ZDaYLaN

November 21 2008

[...] 283 © Login Logger Siteye giriş yapan üyeleri listeler. [...]

[...] © Login Logger Siteye giriş yapan üyeleri [...]

[...] One more thing, do you want to keep track of IP address of user log-ins in your wordpress blog ? or want to keep eyes on failed [or successful] log-in attacks on your blog ?, there is one more nifty Plug-in developed by Stephen Merriman.Check it out. PLUG-IN : Login Logger Download link[3KB] Plug-in Homepage [...]

Ruark

January 15 2009

Great plugin and works perfectly thanks :D

James

March 23 2009

G’day,

Great start to a handy wee plugin. Do you plan on continuing to update this plugin by any chance?

Thanks,
James
=-)

Rob

June 29 2009

Hi There – a note to say thanks for this plugin. It’s on my list of essential plugins for new installs. Also seems to be working fine in Wp 2.8 Nice one :-)

Sam

August 17 2009

It would be nice to see an updated design of the log overview because its hard to read now.
Example:
Sam 2009-08-16 19:39:31 68.*.***.** 45 sec 0 sec
and
Username Time IP How Long Ago Time Since Last Active

some columns are very close without any separation and make it confusing

it would be nice to see some separation between columns and rows and a
(WP 2.8.4)

[...] Wordpress login logger plugin allows you to have logs on who tried to log into the admin [...]

[...] plugin Wordpress login logger vous permet d’enregistrer les tentatives de connexion, et permet donc de retracer les [...]

[...] plugin Wordpress login logger le permite registrar las tentativas de conexión e identificar a los [...]

Sam

August 28 2009

Thanks allot for the design update!!

peter moore

September 2 2009

would be good if this plugin logged the number of times a user has logged in

Feechen

September 3 2009

Hallo,
finde das Plugin auch genial, kann man das irgentwie hinbekommen, das die geköschten User nicht mehr in der Liste angezeigt werden.

Wäre toll

Grüße Feechen

[...] plugin Wordpress login logger vous permet d’enregistrer les tentatives de connexion, et permet donc de retracer les [...]

Doug Barned

September 15 2009

Perfect :) Thanks!

/Doug

Simo Savonen

January 4 2010

Love the plugin, but noticed a design flaw:
if your members never log out, and choose to use the cookie login instead, the plugin never shows their initial log ins.

I modified the code a bit, made the function loging_active() check if the database has any mention of the user (otherwise the update statement doesn’t do anything):

function loginlog_active() {
global $user_login, $wpdb;
$table_name = $wpdb->prefix.”loginlog”;
$check = $wpdb->prepare( “SELECT * FROM “.$table_name.” WHERE username= %s AND success=’1′”,$user_login);
$empty = $wpdb->query($check);
if($empty == 0) { loginlog_loginsuccess($user_login); }
else {
$update = $wpdb->prepare(“UPDATE “.$table_name.” SET active = %s WHERE username=%s”,current_time(‘mysql’),$user_login);
$wpdb->query($update);
}
}

Simo Savonen

January 4 2010

oops, small bug, should be:

if($empty == 0 && is_user_logged_in() )

Jonesy

June 4 2010

Simo –
Thanks for that update! Plugin works great with WP 2.9.2…

Jeremy Clulow

June 7 2010

Thanks. Very useful plugin for my community site at http://www.newcastle-emlyn.com

aljuk

August 28 2010

It would be useful, for starters, if you could view logins ordered by date, and automatically delete unused accounts over a certain age.

Are you planning to develop the plugin with some functionality?

add a thought

Elsewhere: Skype MSN Messenger Twitter Facebook