src/user/controllers/SettingsController.php
public function actionAvatar()
    {
        $model = new AvatarForm();
        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            Yii::$app->getSession()->setFlash('success', Yii::t('yuncms', 'Your avatar has been updated'));
        }
        return $this->render('avatar', [
            'model' => $model,
        ]);
    }
public function actionAvatar()
    {
        $model = new AvatarForm();
        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            Yii::$app->getSession()->setFlash('success', Yii::t('yuncms', 'Your avatar has been updated'));
        }
        return $this->render('avatar', [
            'model' => $model,
        ]);
    }
public function actionAvatar ( ) { $ model = new AvatarForm ( ) ; if ( $ model -> load ( Yii :: $ app -> request -> post ( ) ) && $ model -> save ( ) ) { Yii :: $ app -> getSession ( ) -> setFlash ( 'success' , Yii :: t ( 'yuncms' , 'Your avatar has been updated' ) ) ; } return $ this -> render ( 'avatar' , [ 'model' => $ model , ] ) ; }
Show portrait setting form
@return \yii\web\Response|string
@throws \League\Flysystem\FileExistsException
@throws \League\Flysystem\FileNotFoundException
@throws \yii\base\ErrorException
@throws \yii\base\Exception
@throws \yii\base\InvalidConfigException
Show portrait setting form