src/controllers/DefaultController.php
public function actionLogin()
    {
        $password = Yii::$app->request->post('pass', false);

        // check password
        if ($password === $this->module->password || $this->hasAccess()) {
            Yii::$app->session->set(self::STYLEGUIDE_SESSION_PWNAME, $password);
            return $this->redirect(['index']);
        } elseif ($password !== false) {
            Yii::$app->session->setFlash('wrong.styleguide.password');
        }

        return $this->render('login');
    }
public function actionLogin()
    {
        $password = Yii::$app->request->post('pass', false);

        // check password
        if ($password === $this->module->password || $this->hasAccess()) {
            Yii::$app->session->set(self::STYLEGUIDE_SESSION_PWNAME, $password);
            return $this->redirect(['index']);
        } elseif ($password !== false) {
            Yii::$app->session->setFlash('wrong.styleguide.password');
        }

        return $this->render('login');
    }
public function actionLogin ( ) { $ password = Yii :: $ app -> request -> post ( 'pass' , false ) ; // check password if ( $ password === $ this -> module -> password || $ this -> hasAccess ( ) ) { Yii :: $ app -> session -> set ( self :: STYLEGUIDE_SESSION_PWNAME , $ password ) ; return $ this -> redirect ( [ 'index' ] ) ; } elseif ( $ password !== false ) { Yii :: $ app -> session -> setFlash ( 'wrong.styleguide.password' ) ; } return $ this -> render ( 'login' ) ; }
Login action if password is required.

@return \yii\web\Response|string
Login action if password is required .