Hello. Help me please. There is a controller that Ajax-som takes values. Task: after writing a user name to the check?
if(Yii::app()->request->isAjaxRequest){ Yii::app()->user->name = 'reg'; }
This code does not give a result:
class ChekSingupController extends Controller { public function actionIndex() { // если запрос асинхронный, то нам нужно отдать только данные if(Yii::app()->request->isAjaxRequest){ if(Yii::app()->request->isAjaxRequest){ Yii::app()->user->name = 'reg'; } // Завершаем приложение Yii::app()->end(); } }