diff --git a/themes/tajian/controller/SiteController.php b/themes/tajian/controller/SiteController.php index 481f1c7..4f66ae8 100644 --- a/themes/tajian/controller/SiteController.php +++ b/themes/tajian/controller/SiteController.php @@ -175,9 +175,13 @@ Class SiteController extends Controller { public function actionNew() { //判断是否已经登录,自动跳转到自己的添加视频网址 $loginedUser = Common::getUserFromSession(); - if (!empty($loginedUser['username']) && !empty(FSC::$app['config']['multipleUserUriParse']) && empty(FSC::$app['user_id'])) { - $shareUrl = "/{$loginedUser['username']}/site/new/"; - return $this->redirect($shareUrl); + 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/); + } } //获取数据