Extension talk:UserLoginLog/Archive

In case this is not obvious, go to your Special:Log/UserLogin page to query the results logged.

Patch for MediaWiki 1.71+
The call for User::newFromId($user->getID); doesn't seem to exist in 1.71, so the fix is to add a function that creates this data... Add this function to the UserLoginLog.php extension code:

function newFromId( $id ) { $u = new User; $u->mId = $id; $u->mFrom = 'id'; return $u; }

Then change the wfUserLoginLogout fuction to look like this:

function wfUserLoginLogout(&$user) { global $wgUserBeforeLogout; $wgUserBeforeLogout = newFromId($user->getID); return true; }

-- David Greenberg, 03/12/2008 12:44PM CDT

Logout was not working
I found out, that a logout wouldn't create a log entry im my mediawiki, so i changed the two following functions:

function wfUserLoginLogout(&$user) { global $wgUserPage, $wgUserName; $wgUserPage = $user->getUserPage; $wgUserName = $user->getName; return true; } function wfUserLoginLogoutComplete(&$user) { global $wgUserPage, $wgUserName; $log = new LogPage('userlogin', false); $log->addEntry('logout', $wgUserPage, $wgUserName); return true; }

For me it also seems to be the nicer solution for this problem.

--12:14, 19 January 2009 (UTC)

Log in / Log out link
Ordinarily when you "log out", the link at the top right changes to "log in".

When this extension is enabled the link still says "log out", even after you already have logged out.

--Cuthbertrumbold 15:49, 10 August 2009 (UTC)


 * While these patches might have patched earlier versions of MediaWiki, neither of them patches version 1.15.1. Still, by installing the unpatched extension into MediaWiki version 1.15.1 the only two problems I've found seem to be as follows:
 * The login/ logout link isn't properly updated upon logout.
 * Logouts are not logged.


 * I hope someone writes a patch that'll work on version 1.15.1 and up. Seems like it was a good extension, but I don't know php well enough to try it myself.
 * Scottperry 17:11, 14 December 2009 (UTC)

Upgrade for 1.18?
Hi all! $wgMessageCache has been removed completely in version 1.18.0 so the extension doesn't work from 1.18 onwards.

Does anyone have a fix?

Upgrade worked
So I contacted the developer (Aran) who helped with an update. The new files (UserLoginLog.php and UserLoginLog.i18n.php) can be downloaded here: http://svn.organicdesign.co.nz/listing.php?repname=extensions&path=%2FUserLoginLog%2F

I've tested it on my 1.18.1 installation and it works well.

Thanks Aran!

Security Issue
Currently the log shows userenames that are not present in the log. That could leak passwords to the log if the user did not safely hit the "tab" or klicks within the password field on login. In my wikilog I found an entry similar to this:

13:16, 28 June 2012 WikiSysop (Talk | contribs | block) Fehler beim Login ‎ (Der Benutzername „AnyusernameAnypassword“ ist nicht vorhanden. Bitte überprüfen Sie die Schreibweise.)

IMHO it would be more safe to reflect something like: A User with IP xxx.xxx.xxx.xxx entered an unknown username. Carchaias (talk) 12:41, 5 August 2012 (UTC)