[eluser]Genuine Scope[/eluser]
Make sure to set the session variable ('user_name');
Eg: $this->session->set_userdata(array(
'user_name'=>'genuinescope'
));
make sure to add library in your controller
$this->load->library('session');
OR
make sure to add 'session' in autoload.php (system->application->config->autoload.php)
$autoload['libraries'] = array('session');