{"action":"created","issue":{"url":"https://api.github.com/repos/dektrium/yii2-user/issues/383","labels_url":"https://api.github.com/repos/dektrium/yii2-user/issues/383/labels{/name}","comments_url":"https://api.github.com/repos/dektrium/yii2-user/issues/383/comments","events_url":"https://api.github.com/repos/dektrium/yii2-user/issues/383/events","html_url":"https://github.com/dektrium/yii2-user/issues/383","id":78091092,"number":383,"title":"404, admin page not found","user":{"login":"Boco10","id":9821606,"avatar_url":"https://avatars.githubusercontent.com/u/9821606?v=3","gravatar_id":"","url":"https://api.github.com/users/Boco10","html_url":"https://github.com/Boco10","followers_url":"https://api.github.com/users/Boco10/followers","following_url":"https://api.github.com/users/Boco10/following{/other_user}","gists_url":"https://api.github.com/users/Boco10/gists{/gist_id}","starred_url":"https://api.github.com/users/Boco10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Boco10/subscriptions","organizations_url":"https://api.github.com/users/Boco10/orgs","repos_url":"https://api.github.com/users/Boco10/repos","events_url":"https://api.github.com/users/Boco10/events{/privacy}","received_events_url":"https://api.github.com/users/Boco10/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-19T13:36:33Z","updated_at":"2015-05-21T17:10:09Z","closed_at":null,"body":"Log:\r\n\r\n15:31:56.209\terror\tyii\\web\\HttpException:404\texception 'yii\\web\\NotFoundHttpException' with message 'Not found' in C:\\xampp\\htdocs\\wizz\\vendor\\dektrium\\yii2-user\\filters\\FrontendFilter.php:33 Stack trace: #0 C:\\xampp\\htdocs\\wizz\\vendor\\yiisoft\\yii2\\base\\ActionFilter.php(71): dektrium\\user\\filters\\FrontendFilter->beforeAction(Object(yii\\base\\InlineAction)) #1 [internal function]: yii\\base\\ActionFilter->beforeFilter(Object(yii\\base\\ActionEvent)) #2 C:\\xampp\\htdocs\\wizz\\vendor\\yiisoft\\yii2\\base\\Component.php(541): call_user_func(Array, Object(yii\\base\\ActionEvent)) #3 C:\\xampp\\htdocs\\wizz\\vendor\\yiisoft\\yii2\\base\\Module.php(607): yii\\base\\Component->trigger('beforeAction', Object(yii\\base\\ActionEvent)) #4 C:\\xampp\\htdocs\\wizz\\vendor\\yiisoft\\yii2\\base\\Controller.php(139): yii\\base\\Module->beforeAction(Object(yii\\base\\InlineAction)) #5 C:\\xampp\\htdocs\\wizz\\vendor\\yiisoft\\yii2\\base\\Module.php(455): yii\\base\\Controller->runAction('index', Array) #6 C:\\xampp\\htdocs\\wizz\\vendor\\yiisoft\\yii2\\web\\Application.php(84): yii\\base\\Module->runAction('user/admin/inde...', Array) #7 C:\\xampp\\htdocs\\wizz\\vendor\\yiisoft\\yii2\\base\\Application.php(375): yii\\web\\Application->handleRequest(Object(yii\\web\\Request)) #8 C:\\xampp\\htdocs\\wizz\\frontend\\web\\index.php(18): yii\\base\\Application->run() #9 {main}\r\n\r\nCode:\r\n\r\nclass FrontendFilter extends \\yii\\base\\ActionFilter\r\n{\r\n    /**\r\n     * @var array\r\n     */\r\n    public $controllers = ['admin'];\r\n    \r\n    /**\r\n     * @param \\yii\\base\\Action $action\r\n     */\r\n    public function beforeAction($action)\r\n    {\r\n        if (in_array($action->controller->id, $this->controllers)) {\r\n            throw new \\yii\\web\\NotFoundHttpException('Not found');\r\n        }\r\n        \r\n        return true;\r\n    }\r\n}\r\n\r\nIt's working when i comment out the in_array section.\r\nAny idea what's going on?"},"comment":{"url":"https://api.github.com/repos/dektrium/yii2-user/issues/comments/104358499","html_url":"https://github.com/dektrium/yii2-user/issues/383#issuecomment-104358499","issue_url":"https://api.github.com/repos/dektrium/yii2-user/issues/383","id":104358499,"user":{"login":"dmeroff","id":1734389,"avatar_url":"https://avatars.githubusercontent.com/u/1734389?v=3","gravatar_id":"","url":"https://api.github.com/users/dmeroff","html_url":"https://github.com/dmeroff","followers_url":"https://api.github.com/users/dmeroff/followers","following_url":"https://api.github.com/users/dmeroff/following{/other_user}","gists_url":"https://api.github.com/users/dmeroff/gists{/gist_id}","starred_url":"https://api.github.com/users/dmeroff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmeroff/subscriptions","organizations_url":"https://api.github.com/users/dmeroff/orgs","repos_url":"https://api.github.com/users/dmeroff/repos","events_url":"https://api.github.com/users/dmeroff/events{/privacy}","received_events_url":"https://api.github.com/users/dmeroff/received_events","type":"User","site_admin":false},"created_at":"2015-05-21T17:10:09Z","updated_at":"2015-05-21T17:10:09Z","body":"@Boco10 there is a problem with this filter, because it does not allow authentication on backend. At the moment you can fix it by configuring behavior as follows:\r\n\r\n```php\r\n'modules' => [\r\n    'user' => [\r\n        // following line will restrict access to admin page\r\n        'as backend' => [\r\n            'class' => 'dektrium\\user\\filters\\BackendFilter',\r\n            'controllers' => ['profile', 'recovery', 'registration', 'settings']\r\n    ],\r\n],\r\n```\r\n\r\nI'll fix this asap."}}