I was trying to use this old extension: http://www.mediawiki.org/wiki/Extension:UserLoginLog to log login attempts. It used $wgMessageCache; therefore it worked fine until we went to a 1.18 wiki. I tried to modernize it by creating a UserLoginLog.i18n file to keep the messages.
I have $wgExtensionMessagesFiles['userLoginLog'] = dirname( __FILE__ ) . "/UserLoginLog.i18n.php"; at setup.
A sample method is:
function wfUserLoginLogSuccess(&$user) {
wfLoadExtensionMessages( 'userLoginLog' );
$log = new LogPage('userlogin',false);
$log->addEntry('success',$user->getUserPage(),wfGetIP());
return true;
}
The statement 'wfLoadExtensionMessages( 'userLoginLog' );' does not seem to do anything because the message in the log is <userlogin-success> instead of the message.
I am not sure how to pass in the message log name or how to make it global now that wgmessageCache is no longer available. Is there a document on how to use the logging feature in the wiki?
Thanks,
Mary Beebe