{"action":"created","issue":{"url":"https://api.github.com/repos/dektrium/yii2-user/issues/667","repository_url":"https://api.github.com/repos/dektrium/yii2-user","labels_url":"https://api.github.com/repos/dektrium/yii2-user/issues/667/labels{/name}","comments_url":"https://api.github.com/repos/dektrium/yii2-user/issues/667/comments","events_url":"https://api.github.com/repos/dektrium/yii2-user/issues/667/events","html_url":"https://github.com/dektrium/yii2-user/issues/667","id":147967223,"number":667,"title":"events on  RegistrationController not working","user":{"login":"luobenyu","id":10202540,"avatar_url":"https://avatars.githubusercontent.com/u/10202540?v=3","gravatar_id":"","url":"https://api.github.com/users/luobenyu","html_url":"https://github.com/luobenyu","followers_url":"https://api.github.com/users/luobenyu/followers","following_url":"https://api.github.com/users/luobenyu/following{/other_user}","gists_url":"https://api.github.com/users/luobenyu/gists{/gist_id}","starred_url":"https://api.github.com/users/luobenyu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luobenyu/subscriptions","organizations_url":"https://api.github.com/users/luobenyu/orgs","repos_url":"https://api.github.com/users/luobenyu/repos","events_url":"https://api.github.com/users/luobenyu/events{/privacy}","received_events_url":"https://api.github.com/users/luobenyu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-13T07:11:36Z","updated_at":"2016-04-13T08:38:29Z","closed_at":null,"body":"Hi, \r\n    I tried events with this config code,but it does not work.Is it important to declare the type of events in code? or any other errors ? Thanks a lot!\r\n    Code below (in a valid config file):\r\n`'modules' => [\r\n        'user' => [\r\n            'class' => 'dektrium\\user\\Module',\r\n            'controllerMap' => [\r\n                'resgitration' => [ \r\n                    'class' => '\\dektrium\\user\\controllers\\RegistrationController',\r\n                    'on '. \\dektrium\\user\\controllers\\RegistrationController::EVENT_BEFORE_CONFIRM => \r\n                        function($event){\r\n                            \\Yii::$app->session->set('test before confirm', $event->getId());\r\n                        } \r\n                ],\r\n           ]\r\n       ],\r\n]`"},"comment":{"url":"https://api.github.com/repos/dektrium/yii2-user/issues/comments/209305033","html_url":"https://github.com/dektrium/yii2-user/issues/667#issuecomment-209305033","issue_url":"https://api.github.com/repos/dektrium/yii2-user/issues/667","id":209305033,"user":{"login":"luobenyu","id":10202540,"avatar_url":"https://avatars.githubusercontent.com/u/10202540?v=3","gravatar_id":"","url":"https://api.github.com/users/luobenyu","html_url":"https://github.com/luobenyu","followers_url":"https://api.github.com/users/luobenyu/followers","following_url":"https://api.github.com/users/luobenyu/following{/other_user}","gists_url":"https://api.github.com/users/luobenyu/gists{/gist_id}","starred_url":"https://api.github.com/users/luobenyu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luobenyu/subscriptions","organizations_url":"https://api.github.com/users/luobenyu/orgs","repos_url":"https://api.github.com/users/luobenyu/repos","events_url":"https://api.github.com/users/luobenyu/events{/privacy}","received_events_url":"https://api.github.com/users/luobenyu/received_events","type":"User","site_admin":false},"created_at":"2016-04-13T08:38:29Z","updated_at":"2016-04-13T08:38:29Z","body":"also I tried `$event` in type `yii\\base\\Event` ,`yii\\web\\UserEvent`, and `dektrium\\user\\events\\UserEvent` ,but got the **same** silent blank. as the source of `dektrium\\user\\controllers\\RegistrationController` pointed:\r\n` /**\r\n     * Event is triggered before confirming user.\r\n     * Triggered with \\dektrium\\user\\events\\UserEvent.\r\n     */\r\n    const EVENT_BEFORE_CONFIRM = 'beforeConfirm';` \r\nis there a proper way to invoke the event ? "}}