我创建了一个新模块,如下所示。
<?php
class dpmessages extends Module
{
function __construct()
{
$this->name = 'dpmessages';
$this->tab = 'administration';
$this->version = '0.1';
parent::__construct();
$this->displayName = $this->l('DP messages');
$this->description = $this->l('Envoyer messages');
parent::__construct();
/* The parent construct is required for translations */
}
function install()
{
$this->registerHook('actionAuthentication');
if (parent::install() == FALSE
)
return FALSE;
return TRUE;
}
function uninstall()
{
if (!parent::uninstall())
return false;
return true;
}
public function hookActionAuthentication($params) {
echo "<pre>".print_r($params)."</pre>";die();
}
}
我在其上注册了一个 actionAuthentication 挂钩,我认为每次新用户登录时都会触发 hookActionAuthentication 的代码,但它不会触发。
我看不到 $params 的转储。
我究竟做错了什么?