I am storing
$custom_data = array(
'userid' => $user_id,
'loggedin' => TRUE
Hang on, there's nothing about using sessions in CodeIgniter anywhere on the internet?
This framework HAS been out for 5 years so I doubt that's the case. Maybe you've not described your problem very well?
By globally accessable if you mean you want to get it in other controllers then use:
That will return your value.
If by globally available you mean you want it available in other PHP files (not CodeIgniter) then thats a totally different thing. You need to use native PHP sessions to work natively with PHP and CodeIgniter sessions to work with CodeIgniter sessions. Simple! :)