Hi guys,
I needed to fetch the user_name of another user than the one connected.
Found nothing simple in the model.
I did this trick in the helper, but I’m sure that there is a better way.
function getUserProperty($id, $prop)
{
$obj =& get_instance();
$obj->lang->load('freakauth');
$obj->load->model('usermodel');
$query = $obj->usermodel->getUserById($id);
if ($query->num_rows() == 1)
{
$row = $query->row();
if (isset($row->$prop)) return $row->$prop;
else return '<h1>unknown prop, please check the columns in table '.$obj->config->item('FAL_table_prefix').'user</h1>';
}
else return $obj->lang->line('FAL_unknown_user');
}
Ideas ?
Dan, what do you think about starting a new thread for the next release ?
This one is huge.
Forget my idea if you want to break the highest score.