Browse Source

improve favorite video add when not logined

master
filesite 9 months ago
parent
commit
1d5e7b5e73
  1. 6
      themes/tajian/controller/SiteController.php

6
themes/tajian/controller/SiteController.php

@ -175,9 +175,13 @@ Class SiteController extends Controller {
public function actionNew() { public function actionNew() {
//判断是否已经登录,自动跳转到自己的添加视频网址 //判断是否已经登录,自动跳转到自己的添加视频网址
$loginedUser = Common::getUserFromSession(); $loginedUser = Common::getUserFromSession();
if (!empty($loginedUser['username']) && !empty(FSC::$app['config']['multipleUserUriParse']) && empty(FSC::$app['user_id'])) { if (!empty(FSC::$app['config']['multipleUserUriParse']) && empty(FSC::$app['user_id'])) {
if (!empty($loginedUser['username'])) {
$shareUrl = "/{$loginedUser['username']}/site/new/"; $shareUrl = "/{$loginedUser['username']}/site/new/";
return $this->redirect($shareUrl); return $this->redirect($shareUrl);
}else {
return $this->redirect(/site/login/);
}
} }
//获取数据 //获取数据

Loading…
Cancel
Save