Browse Source

improve favorite video add when not logined

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

10
themes/tajian/controller/SiteController.php

@ -175,9 +175,13 @@ Class SiteController extends Controller { @@ -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/);
}
}
//获取数据

Loading…
Cancel
Save