I started using Yii2 and should keep more user information in the id. I already know that in Yii2 this should be done using sessions like
Yii::$app->session->set('user.company_id', '121');
This works fine, as I can get these values ββlater in the project using:
Yii::$app->session->get('user.company_id');
. However, these session values ββare erased despite user activity on the same pages. Thus, after 5-10 minutes, the same user sees some fields based on the session value, however after 1 minute, if I update the session values, they will disappear, which should happen when the session is closed or the user quits.
Any suggestions what am I doing wrong?
source
share