controllers/DefaultController.php
public function findModel($new = false)
    {
        $class = \Yii::$app->user->identityClass;
        return $new === true ? new $class() : Yii::$app->user->identity;
    }
public function findModel($new = false)
    {
        $class = \Yii::$app->user->identityClass;
        return $new === true ? new $class() : Yii::$app->user->identity;
    }
public function findModel ( $ new = false ) { $ class = \ Yii :: $ app -> user -> identityClass ; return $ new === true ? new $ class ( ) : Yii :: $ app -> user -> identity ; }
Finds user model.
@param boolean $new
@return User
Finds user model .