frontend/controllers/SiteController.php
/**
     * Displays homepage.
     * if user are logged into member than will be redirected to /user/files
     * @return mixed
     */
Displays homepage.
if user are logged into member than will be redirected to /user/files
@return mixed
Displays homepage . if user are logged into member than will be redirected to / user / files @return mixed
public function actionIndex()
    {
        if (Yii::$app->user->isGuest) {
            return $this->render('index', [
                'model_signup2' => new SignupForm2(),
                'software' => Software::findOtherVersionSoftware(),
                'traf' => Yii::$app->params['self_hosted'] ? null: TrafSearch::search(),
            ]);
        } else {
            return $this->redirect(['/user/files']);
        }
    }
public function actionIndex ( ) { if ( Yii :: $ app -> user -> isGuest ) { return $ this -> render ( 'index' , [ 'model_signup2' => new SignupForm2 ( ) , 'software' => Software :: findOtherVersionSoftware ( ) , 'traf' => Yii :: $ app -> params [ 'self_hosted' ] ? null : TrafSearch :: search ( ) , ] ) ; } else { return $ this -> redirect ( [ '/user/files' ] ) ; } }
Displays homepage.
Displays homepage .