I’m using the codeigniter session class (autoload). How can I set initialize values? I need this because I want to initialize the default language.
Best regards …
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To load initialize data into your session, you can use hooks.
You can use a
post_controller_constructorhook (in thepre_controllerhook, the session may not loaded yet).Open up
config/hooks.phpand add this:And then in the
hooksfolder make a file calledSessionData.phpcontaining the following: