Commit 8888369cf51a70c190cb392b4c9eecb8c9b95ba0

Authored by Neil Blakey-Milner
1 parent 1e6d98df

Don't worry about permissions - the GroupUserLink will take care of that

itself.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3133 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/administration/usermanagement/editUserGroupsBL.php
... ... @@ -40,10 +40,7 @@ function updateGroups($iUserID, $aToAddIDs, $aToRemoveIDs) {
40 40 foreach ($aToAddIDs as $iGroupID ) {
41 41 if ($iGroupID > 0) {
42 42 $oUserGroup = new GroupUserLink($iGroupID, $iUserID);
43   - if($oUserGroup->create()) {
44   - // update group search permissions
45   - $oUserGroup->updateSearchPermissions();
46   - } else {
  43 + if (!$oUserGroup->create()) {
47 44 return false;
48 45 }
49 46 }
... ... @@ -54,10 +51,7 @@ function updateGroups($iUserID, $aToAddIDs, $aToRemoveIDs) {
54 51 if ($iGroupID > 0) {
55 52 $oUserGroup = new GroupUserLink($iGroupID, $iUserID);
56 53 $oUserGroup->setUserGroupID($iGroupID,$iUserID);
57   - if($oUserGroup->delete()) {
58   - // update group search permissions
59   - $oUserGroup->updateSearchPermissions();
60   - } else {
  54 + if(!$oUserGroup->delete()) {
61 55 return false;
62 56 }
63 57 }
... ...