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