这家伙有点懒,还没写个性签名!
根据我自己实测的经验,使用$this->on绑定并不会触发绑定事件,使用yii::$app->user->on的绑定可以正常触发登录事件
UserController.php中不应该使用__constrouct,因为会报如下错误“Call to a member function getUniqueId() on null”,应该使用public function init()来初始化。