[eluser]esset[/eluser]
Hey guys, I have a wierd issue. I'm not sure if I'm doing something wrong or whats going on.
In my config-file I have this:
Code:
$config['permissions']['create_user'] = "n";
$config['permissions']['create_case'] = "n";
$config['permissions']['can_assign_teams'] = "n";
$config['permissions']['can_access_users'] = "n";
Then in my MODEL I'm doing this:
Code:
$permissions = $this->config->item('permissions');
foreach($permissions as $key => $value)
{
$field = $this->input->post($key, 'xss_clean|trim');
if(isset($field)) $permissons[$key] = $field;
}
print_r($permissions);
If I POST a variable "create_user" with a value of "y" it doesn't stick to the array. The key "create_user" is still "n" in the print_r.
Even if I set it manually in the code like so:
Code:
$permissions['create_user'] = "y";
print_r($permissions);
the output is still "n" for that key in print_r and the array.
Any ideas why this is so? Am I accessing/setting the array wrong?
Thanks