hello; I have a controller that I extended from dektrium\user\controllers\securityController a YII user extension, the problem I notice its actions are not changing it own property values and other such as yii::$app properties. What can the problem be?
public function actionHome($lang=null)
{
$lan='HELLO';
$langchoisie = Yii::$app->request->get('lang');
yii::$app->language='fr-FR';
$model = \Yii::createObject(LoginForm::className());
$this->performAjaxValidation($model);
if ($model->load(\Yii::$app->getRequest()->post()) && $model->login()) {
return $this->render('index');
}
return $this->render('login', [
'model' => $model,
'module' => $this->module,'lan'=>$lan
]);
}
In this code when I access in the view yii::$app->language the value is ‘en-US’ its default and when I access $lan in view it gives undefined variable $lan…
Please I need your help to understand what is wrong.