Commit bd69f633a55570f269c23732dee945daf553f2d0
1 parent
22880e38
#3519 select a group in your unit if you're a unit administrator and none has been selected
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2790 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
12 additions
and
0 deletions
presentation/lookAndFeel/knowledgeTree/administration/usermanagement/listUsersBL.php
| ... | ... | @@ -37,6 +37,18 @@ require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/ad |
| 37 | 37 | |
| 38 | 38 | if (checkSession()) { |
| 39 | 39 | $oPatternCustom = & new PatternCustom(); |
| 40 | + if (Permission::userIsUnitAdministrator() && !$fGroupID) { | |
| 41 | + $default->log->info("unitadmin and undefined fGroupID"); | |
| 42 | + // #3519 select a group in your unit if you're a unit administrator and none has been selected | |
| 43 | + $sql = $default->db; | |
| 44 | + $sql->query("SELECT group_id FROM $default->groups_units_table WHERE unit_id = " . | |
| 45 | + User::getUnitID($_SESSION["userID"]) . " ORDER BY group_id"); | |
| 46 | + if ($sql->next_record()) { | |
| 47 | + $fGroupID = $sql->f("group_id"); | |
| 48 | + } | |
| 49 | + } else { | |
| 50 | + $default->log->info("fGroupID=$fGroupID"); | |
| 51 | + } | |
| 40 | 52 | $oPatternCustom->setHtml(getPage($fGroupID)); |
| 41 | 53 | require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); |
| 42 | 54 | $main->setCentralPayload($oPatternCustom); | ... | ... |