mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/LoginNotify
synced 2024-11-28 08:50:17 +00:00
222b7475fb
Only core hooks are run, but own HookRunner is recommended Bug: T263353 Change-Id: I2506f4af21ef955a7feeb145d5173f46ca11b334
32 lines
659 B
PHP
32 lines
659 B
PHP
<?php
|
|
|
|
namespace LoginNotify\Hooks;
|
|
|
|
use MediaWiki\HookContainer\HookContainer;
|
|
|
|
/**
|
|
* This is a hook runner class, see docs/Hooks.md in core.
|
|
* @internal
|
|
*/
|
|
class HookRunner implements
|
|
\MediaWiki\Auth\Hook\AuthManagerLoginAuthenticateAuditHook
|
|
{
|
|
private HookContainer $hookContainer;
|
|
|
|
public function __construct( HookContainer $hookContainer ) {
|
|
$this->hookContainer = $hookContainer;
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function onAuthManagerLoginAuthenticateAudit( $response, $user,
|
|
$username, $extraData
|
|
) {
|
|
return $this->hookContainer->run(
|
|
'AuthManagerLoginAuthenticateAudit',
|
|
[ $response, $user, $username, $extraData ]
|
|
);
|
|
}
|
|
}
|