]Solved]Session Data

Okay, so I’m about to be interviewing for a job where I’d be using Yii and as such I’d like to learn a little bit about the framework before going in. Getting the application started was fairly painless, and, once I found a small syntax error I made, converting the login from hard-coded to db-based wasn’t bad either. My next goal is to create a simple blog system using it, but in order to do so obviously I will have to deal with user permissions, etc. Anyways, point being I hit print_r($_SESSION); in order for me to see how they set up the data after you log in, but i noticed a weird md5 looking prefix in front of each key (i changed it in case it actually contained personal info):

Array ( [cbb796a1599470505802dc1a1a1a1a1a_id] => demo [cbb796a1599470505802dc1a1a1a1a1a__name] => demo [cbb796a1599470505802dc1a1a1a1a1a__states] => Array ( ) )

Is this prefix static or does it change per user, per host, etc.? Is there any function in Yii::app() that would let me get that prefix? If not, where are those set so that I can remove them and replace them with my own?

Any information would be appreciated, also any tips on good Yii references, or how to think in Yii would be appreciated. I don’t have any other framework experience, although I am currently working on my own framework type thing.


Prefix comes from Yii::app()->user->getStateKeyPrefix();


Hopefully this will help you. We do not use $_SESSIONS in our yii apps.