Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Alex Papakyriacou 4 posts 33 karma points
    Aug 07, 2014 @ 16:12
    Alex Papakyriacou
    0

    Keeping a log of sign ins

    Hi,

    We have received a strange request from one of our clients:

    "We need to get a all the log in's for the last 6 months. At the very least, we need a log containing the username, date, time and login result (success or failure). If we can get theIP for the login attempt, that would be great!"

    As far as anyone in our team knows, there is no native functionality or 3rd party plugin that can do this kind of thing.

    We'd really appreciate any help. Thanks!

    Alex

  • Rolf Johansson 53 posts 315 karma points
    Aug 07, 2014 @ 18:48
    Rolf Johansson
    100

    In the database all logins get written to the table umbracoLog, so...

    select l.DateStamp,u.UserLogin from umbracoLog l, umbracoUser u where l.UserId=u.Id and l.LogHeader='Login' order by l.DateStamp;

    would at least give the login times for different users that were successful.

    Well, anyway... further investigations show that this might have stopped working in some 6.x version, I'm not sure whether it's the case with new versions.

  • Alex Papakyriacou 4 posts 33 karma points
    Aug 11, 2014 @ 08:37
    Alex Papakyriacou
    0

    Thank you Rolf. Very much appreciate the response.

  • Rolf Johansson 53 posts 315 karma points
    Aug 11, 2014 @ 09:40
    Rolf Johansson
    0

    You could of course also look in the webserver log files. In Umbraco 7 it seems like loginForm is posting to /umbraco/backoffice/UmbracoApi/Authentication/PostLogin and returns 400 Bad Request on failed logins and 200 OK on successful attempts. There you'll also find the login and the IP address. This should be possible to compare with the umbracoLog db table, I guess.

Please Sign in or register to post replies

Write your reply to:

Draft