diff --git a/themes/tajian/controller/SiteController.php b/themes/tajian/controller/SiteController.php index fbe8658..5ea7738 100644 --- a/themes/tajian/controller/SiteController.php +++ b/themes/tajian/controller/SiteController.php @@ -172,18 +172,18 @@ Class SiteController extends Controller { } //添加新视频 + //增加必须登录才能使用限制 public function actionNew() { //判断是否已经登录,自动跳转到自己的添加视频网址 $loginedUser = Common::getUserFromSession(); - if (!empty(FSC::$app['config']['multipleUserUriParse']) && empty(FSC::$app['user_id'])) { - if (!empty($loginedUser['username'])) { - $shareUrl = "/{$loginedUser['username']}/site/new/"; - return $this->redirect($shareUrl); - }else { - return $this->redirect('/site/login/'); - } + if (empty($loginedUser['username'])) { + return $this->redirect('/site/login/'); + }else if (!empty(FSC::$app['config']['multipleUserUriParse']) && empty(FSC::$app['user_id']) && !empty($loginedUser['username'])) { + $shareUrl = "/{$loginedUser['username']}/site/new/"; + return $this->redirect($shareUrl); } + //获取数据 $menus = array(); //菜单,一级目录 $htmlReadme = ''; //Readme.md 内容,底部网站详细介绍