Wordpress plugin: Login Logger

July 4, 2007

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

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 plugin has been tested in 2.5

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 the plugin

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

Updates:

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.

Comments
  1. [...] 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. [...]

    Weblog Tools Collection » Blog Archive » WordPress Plugin Releases for 7/5, July 4, 2007

  2. [...] Visit [...]

    WP Plugins DB » Plugin Details » Login Logger, July 4, 2007

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

    Skylog » Blog Archive » links for 2007-07-06, July 5, 2007

  4. Thank you,

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

    -Jake

    Jake Johnson, July 5, 2007

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

    — Choder, July 6, 2007

  6. looks good to me! Thanks!

    larry, July 7, 2007

  7. Thanks for the plugin it should be very helpful.

    design for myspace, July 9, 2007

  8. good info…thanks…

    ciken, July 12, 2007

  9. Nice one! got it working already!

    Aaron, July 13, 2007

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

    Login Logger | わーどぷれすっ!, July 15, 2007

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

    Gill, July 15, 2007

  12. Hi Gill - its in the ‘Users’ menu.

    — Stephen, July 16, 2007

  13. 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.

    vlp, July 19, 2007

  14. [...] 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. [...]

    Free as in Time » Blog Archive » Wordpress Wednesday 18/07/2007, July 19, 2007

  15. [...] 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: [...]

    TechnologyTales.com » Blog Archive » Login Logger plugin, July 20, 2007

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

    moby, July 29, 2007

  17. 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!

    — Sjebo, August 1, 2007

  18. 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.

    wordpress quickstart guy, August 12, 2007

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

    bilgiservisim » En iyi 100 wordpress eklentisi, September 4, 2007

  20. 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.

    Bollywood Blog, September 11, 2007

  21. 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!

    Robert, September 14, 2007

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

    En iyi 100 wordpress eklentisi | Turkmecmua, September 18, 2007

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

    moby, September 20, 2007

  24. Thanks..
    […] Açıklamalı 232 Wordpress eklentisi (Agu. 15, 2007 !!) (Wordpress plugin list),[…]

    canarkadaş, September 23, 2007

  25. 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!

    — dan, September 24, 2007

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

    — Stephen, October 1, 2007

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

    How To Secure Your WordPress Blog | FabNet Revenue, October 11, 2007

  28. 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.

    — Danny, October 12, 2007

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

    何如保护你的wordpress博客安全 » Rapid Search, October 20, 2007

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

    — aditya, October 25, 2007

  31. Thanks for the plugin

    forum, October 30, 2007

  32. 是吗?这样也可以反应釜

    jill0001, October 31, 2007

  33. 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

    larry, November 9, 2007

  34. 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????

    Demian, November 11, 2007

  35. 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?

    — Junipingla, November 14, 2007

  36. 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

    — huh, November 18, 2007

  37. 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

    Lance Homer, November 30, 2007

  38. [...] 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) [...]

    Plugin wordpress | Valeriu Tihai, December 3, 2007

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

    230 Wordpress eklentisi — Wordpress Türkiye, December 8, 2007

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

    leocheng™ 博客 » Blog Archive » 何如保护你的Wordpress博客安全, December 17, 2007

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

    pele, December 31, 2007

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

    What should I do?

    THank you.

    — Tom, January 4, 2008

  43. 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.

    — Jason, January 23, 2008

  44. 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?

    — rachelcunliffe, January 23, 2008

  45. 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.

    — Jason, January 25, 2008

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

    300 Adet Wordpress Eklentisi : Yılmaz Eres, January 26, 2008

  47. 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.

    — Stephen, January 28, 2008

  48. 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

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

    Norberto Kawakami, February 13, 2008

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

    Segurança: Monitorando os Logins no Blog | Escrita Torta em Linha Reta, February 13, 2008

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

    Top Plugins WordPress 2008 | Escrita Torta em Linha Reta, February 26, 2008

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

    — ll, March 4, 2008

  53. 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?

    — rachelcunliffe, March 5, 2008

  54. 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.

    — ll, March 9, 2008

  55. [...] 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. [...]

    Plantillas para Blogger, recursos y herramientas » 22 plugins para mejorar la seguridad de tu blog con WordPress., March 10, 2008

  56. 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

    — Danny, March 22, 2008

  57. 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.

    — Chris, April 8, 2008

  58. 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

    baron, April 8, 2008

  59. Thanks Rachel,

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

    — Chris, April 9, 2008

  60. 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?

    — Stephen, April 9, 2008

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

    Melhores Plugins para o Wordpress - Pc Saudável.com, April 15, 2008

  62. [...] 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 [...]

    13 plugins de segurança de seu blog do WordPress, May 2, 2008

  63. [...] 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. [...]

    Order of the Bath » Blog Archive » User profiles in WordPress, May 20, 2008

  64. 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

    — Darkraisin, June 6, 2008

  65. [...] 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. [...]

    Aumentando a Segurança do seu Blog em WordPress | Escrita Torta em Linha Reta, July 7, 2008

  66. 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.

    şapkacı, July 23, 2008

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

    promosyon, July 24, 2008

  68. 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.

    toys, July 29, 2008

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

    Jonathan Hensley | The Blog » Build a Secure Family Blog with Wordpress, August 6, 2008

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

    word press eklentileri on Grafik Hocam, August 14, 2008

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

    iş elbiseleri, August 15, 2008

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

    Promosyon şapka, August 15, 2008

RSS feed for comments on this post.

Leave a comment