[eluser]libnac[/eluser]
Hi,
If anyone has problems with a hooks be sure that the hook class or function is not finished by any blank space or anything else, because you will be in a trouble.
Code:
<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* Lang
*/
function setlang() {
$ci =& get_instance();
$class = strtolower($ci->uri->router->class);
if(!$ci->db_session->userdata('logged_in')) {
$newdata = array(
'username' => 'guest',
'email' => '',
'logged_in' => TRUE,
'lang' => 'spanish',
);
$ci->db_session->set_userdata($newdata);
}
$ci->lang->load($class , $ci->db_session->userdata('lang'));
}
?> <-- !!!!!!!!DELETE ALL CHARS FROM HERE!!!!!!!!
I hope this will be useful.
Regards,
libnac