function _compile_userdata()
{
$output = array();
if (FALSE !== $this->CI->load->is_loaded('session')) {
$compiled_userdata = $this->CI->session->all_userdata();
if (count($compiled_userdata)) {
foreach ($compiled_userdata as $key => $val) {
if (is_numeric($key)) {
$output[$key] = "'{$val}'";
}
if (is_array($val) || is_object($val)) {
$output[$key] = htmlspecialchars(stripslashes(print_r($val, true)));
} else {
$output[$key] = htmlspecialchars(stripslashes($val));
}
}
}
}
return $output;
}