Reputation: 151
I have started using Yii2 and need to store more information about user in identity. 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 am able to get these values later in project using:
Yii::$app->session->get('user.company_id');
. However, these session values are getting wiped up despite user activity on same pages. So after 5-10 minutes, the same user sees some fields based on session value, however, after 1 minute if I refresh the session values go away which should actually happen on session close or user logout.
Any suggestions what I am doing wrong?
Upvotes: 4
Views: 4229