Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
nateiler committed Jun 14, 2018
2 parents af1d543 + 4bb7248 commit 44ce3a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Changelog
=========
## Unreleased
### Fixed
- User Type associations were not saving correctly when all associations were un-selected.

## 1.0.0-rc.13 - 2018-06-07
### Added
- Services have a configurable cache duration and dependency that can be set via the plugin's settings config.
Expand Down
3 changes: 2 additions & 1 deletion src/cp/controllers/UserTypesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ public function actionSaveAssociations(): Response
$request->getRequiredBodyParam('organization')
);

$types = array_keys(array_filter((array)$request->getRequiredBodyParam('types')));
$query = Organizations::getInstance()->getUserTypes()->getQuery([
'id' => array_keys(array_filter((array)$request->getRequiredBodyParam('types')))
'id' => empty($types) ? ':empty:' : $types
]);

$query->setCachedResult(
Expand Down

0 comments on commit 44ce3a3

Please sign in to comment.