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?