skeeks\cms\controllers\UserController::actionEditInfo PHP Method

actionEditInfo() public method

public actionEditInfo ( ) : string
return string
    public function actionEditInfo()
    {
        $model = $this->user;
        $rr = new RequestResponse();
        if ($rr->isRequestOnValidateAjaxForm()) {
            return $rr->ajaxValidateForm($model);
        }
        if ($rr->isRequestAjaxPost()) {
            if ($model->load(\Yii::$app->request->post()) && $model->save()) {
                $rr->success = true;
                $rr->message = 'Данные успешно сохранены';
            } else {
                $rr->message = 'Не получилось сохранить данные';
            }
            return $rr;
        }
        return $this->render($this->action->id);
    }