![]() |
Seeing other users in other departments - Printable Version +- Community Support for OpenDocMan (Deprecated) (https://forum.opendocman.com) +-- Forum: OpenDocMan Community Discussion (https://forum.opendocman.com/forum-5.html) +--- Forum: OpenDocMan Support - Community Based (https://forum.opendocman.com/forum-6.html) +--- Thread: Seeing other users in other departments (/thread-144.html) |
Seeing other users in other departments - Stephen - 01-13-2010 opplevelse 2007-07-28 05:51:09 PDT Is there any way I can ensure that a user can only see other users in their own department? jonathanwminer 2007-07-30 06:36:48 PDT Hi - Can you clarify? Do you want users to only see documents authored by users in their same department? Or are you referring which users get displayed in the various "pull-down" menus? opplevelse 2007-07-30 12:18:42 PDT I'm referring to particular users being displayed ... imagine you have a company with 100 employees in 10 different departments each with 10 people each ... there is no need for every single person to see the full 100 people in the company, they just care about sharing files within their own department. Perhaps a few admins will want to see everyone, but certainly not most users. I can not see a way to stop this. jonathanwminer 2007-08-06 19:23:37 PDT You need to edit functions.php. Look for the term "FOR AUTHOR". The first three lines are new, the fourth line is modified. This modified the drop-down list for the "Browse by Author" menu. Let me know if this works for you. $query = "SELECT department FROM user WHERE id = ".$_SESSION['uid']; $result = mysql_query($query); list($dept_id) = mysql_fetch_row($result); $query = "SELECT last_name, first_name, id FROM user WHERE department = ".$dept_id." ORDER BY last_name ASC"; jonathanwminer 2007-08-09 07:47:47 PDT See patch number 1770849 |