public function actionIndex()
    {
        if (defined('YII_DEBUG') && YII_DEBUG) {
            $actions = $this->module->getActions();
            return $this->render('index', ["actions" => $actions]);
        } elseif (Yii::$app->user->isGuest) {
            return $this->redirect(["/user/login"]);
        } else {
            return $this->redirect(["/user/account"]);
        }
    }
public function actionIndex()
    {
        if (defined('YII_DEBUG') && YII_DEBUG) {
            $actions = $this->module->getActions();
            return $this->render('index', ["actions" => $actions]);
        } elseif (Yii::$app->user->isGuest) {
            return $this->redirect(["/user/login"]);
        } else {
            return $this->redirect(["/user/account"]);
        }
    }
public function actionIndex ( ) { if ( defined ( 'YII_DEBUG' ) && YII_DEBUG ) { $ actions = $ this -> module -> getActions ( ) ; return $ this -> render ( 'index' , [ "actions" => $ actions ] ) ; } elseif ( Yii :: $ app -> user -> isGuest ) { return $ this -> redirect ( [ "/user/login" ] ) ; } else { return $ this -> redirect ( [ "/user/account" ] ) ; } }
Display index - debug page, login page, or account page
Display index - debug page login page or account page