前台用户控制器和前台控制器类似,只是它需要用户登录后才能访问,要渲染的视图也在前台模板目录(`public/themes/`)里,要继承`cmf\controller\UserBaseController` 如: ```php <?php namespace app\portal\controller; use cmf\controller\UserBaseController; class UserController extends UserBaseController { public function articles() { return $this->fetch(); } } ``` 上面`UserController`要渲染的模板文件是`themes/前台当前主题目录/portal/user/articles.html`