How do I pass the session variable userid
to a text input? Using Yii::app->session
?
loginform model of my application
$session = Yii::$app->session;
$session->set('userid', $this->getUser($this->email, 'id'));
$session->set('firstname', $this->getUser($this->email, 'fname'));
view/ form
<?= $form->field($model, 'name')->textInput(['value' => Yii::$app->session['email']]) ?>