![]() |
Your thoughs on seperate frontend and backend sessions - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Your thoughs on seperate frontend and backend sessions (/showthread.php?tid=66030) |
Your thoughs on seperate frontend and backend sessions - wolfgang1983 - 08-26-2016 Hello When I use have set session in the past for front end and admin I have set them like Code: $this->session->set_userdata('admin', array('some admin array items')); And Code: $this->session->set_userdata('catalog', array('some front end array items')); But I was thinking if could do it this way My question is. Is the way below OK? PHP Code: $_SERVER['REQUEST_URI_PATH'] = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); RE: Your thoughs on seperate frontend and backend sessions - rtenny - 08-26-2016 (08-26-2016, 12:14 AM)wolfgang1983 Wrote: Hello When I use have set session in the past for front end and admin I have set them like This is actually a cool idea. I cannot see anything wrong and I will give this a try myself. Thanks for sharing RE: Your thoughs on seperate frontend and backend sessions - Wouter60 - 08-26-2016 Very good indeed. One thing though. Why do you 'calculate' the segment yourself? The URI class (which is automatically initialized) will do that for you. See: http://www.codeigniter.com/userguide3/libraries/uri.html RE: Your thoughs on seperate frontend and backend sessions - wolfgang1983 - 08-26-2016 (08-26-2016, 11:57 AM)Wouter60 Wrote: Very good indeed. Because I can't load uri->segments into the config.php file. |