So I've been working with customising the program for a bit and one of the things I'd like to do would be to limit the logged in user to only see his/her department. When creating new tickets you can select any department from the list.
I've found the bit of code I need to edit in ticket-inc.open.php:
?php
if($depts=Dept:()) {
foreach($depts as $id =>$name) {
echo sprintf('<option value="%d" %s>%s</option>',
$id, ($info==$id)?'selected="selected"':'',$name);
}
}
?>
Where it selects all departments placing them into a drop down list. What I haven't been able to do so far is select the current logged in users department and have it display only that. My way of thinking about it is I'll need to get the current users department and then compare it inside the loop before the echo statement. I've bee unsuccessful so far but I'm still learning the make up of the program.
Anyone have any pointers?