[eluser]jprateragg[/eluser]
I'm new to CodeIgniter and have a question about best practices when dealing with frequently session data. In my session, I store the user id, user name, and some other things. I have several models/functions where I need to pass the user id. When I call the function, I've been calling:
Code:
$this->User->get_user_info($this->session->userdata('user_id'))
Would it be okay to save this data to a variable in MY_Controller instead so I can simply enter $this->user_id instead of typing out all the characters when using the session library? Is this better? Any security concerns? Thanks!