diff --git a/src/Mapbender/DataManagerBundle/Component/UserFilterProvider.php b/src/Mapbender/DataManagerBundle/Component/UserFilterProvider.php index d1a33f34..034d10e4 100644 --- a/src/Mapbender/DataManagerBundle/Component/UserFilterProvider.php +++ b/src/Mapbender/DataManagerBundle/Component/UserFilterProvider.php @@ -95,7 +95,7 @@ protected function getFilterValue() if ($token instanceof NullToken) { return null; } else { - return $token->getUsername(); + return $token->getUserIdentifier(); } } } diff --git a/src/Mapbender/DataSourceBundle/Component/DataRepository.php b/src/Mapbender/DataSourceBundle/Component/DataRepository.php index 46c6123a..c19a4ae6 100644 --- a/src/Mapbender/DataSourceBundle/Component/DataRepository.php +++ b/src/Mapbender/DataSourceBundle/Component/DataRepository.php @@ -350,7 +350,7 @@ protected function addQueryFilters(QueryBuilder $queryBuilder, $includeDefaultFi $queryBuilder->andWhere($params['where']); } if ($setUserParam) { - $queryBuilder->setParameter('userName', $this->tokenStorage->getToken()->getUsername()); + $queryBuilder->setParameter('userName', $this->tokenStorage->getToken()->getUserIdentifier()); } }