有办法通过插件拦截Piwik/Matomo中的登录事件吗?
Have a way to intercept, through a plugin, the login event in Piwik/Matomo?
我需要拦截登录事件,我已经尝试通过事件,但没有像我预期的那样工作。
/**
* @return array
*/
public function registerEvents()
{
$hooks = array(
// 'Request.initAuthenticationObject' => 'initAuthenticationObject',
// 'API.Request.authenticate' => 'ApiRequestAuthenticate',
// 'Request.dispatch' => 'RequestDispatch'
);
return $hooks;
}
这取决于您要做什么。登录前后会发布事件,例如 Login.authenticate
和 Login.authenticate.failed
、Login.authenticate.successful
我需要拦截登录事件,我已经尝试通过事件,但没有像我预期的那样工作。
/**
* @return array
*/
public function registerEvents()
{
$hooks = array(
// 'Request.initAuthenticationObject' => 'initAuthenticationObject',
// 'API.Request.authenticate' => 'ApiRequestAuthenticate',
// 'Request.dispatch' => 'RequestDispatch'
);
return $hooks;
}
这取决于您要做什么。登录前后会发布事件,例如 Login.authenticate
和 Login.authenticate.failed
、Login.authenticate.successful