UserGroupBackend: Always use `utf8` as db connection charset

This commit is contained in:
Johannes Meyer 2021-07-26 16:36:26 +02:00
parent 7ce3778378
commit 517c108cc4
1 changed files with 6 additions and 1 deletions

View File

@ -164,8 +164,13 @@ class UserGroupBackend
$name
);
}
$resource = ResourceFactory::create($backendConfig->resource);
$resourceConfig = ResourceFactory::getResourceConfig($backendConfig->resource);
if ($backendType === 'db') {
$resourceConfig->charset = 'utf8';
}
$resource = ResourceFactory::createResource($resourceConfig);
switch ($backendType) {
case 'db':
$backend = new DbUserGroupBackend($resource);