I want to get my session variables in my model. Im not using Auth component. Is there any alternate way ?
Thanks
Binoy
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.
You would need to use the Session helper to do,
But as the comment states, you’ll be wanting to set a variable in your model and then use the session to write the same value into that variable in the model, rather than accessing the session actually in the model.
Then in your controller you could use something along the lines of,