* Returns a specific principal, specified by its path.
* The returned structure should be the exact same as from
* getPrincipalsByPrefix.
*
* It is possible to optionally filter retrieved properties in case only a limited set is
* required. Note that the implementation might return more properties than requested.
*
* @param string $path The path of the principal
* @param string[]|null $propertyFilter A list of properties to be retrieved or all if null. An empty array will cause a very shallow principal to be retrieved.
*/
public function getPrincipalPropertiesByPath($path, ?array $propertyFilter = null): ?array {
[$prefix, $name] = \Sabre\Uri\split($path);
$decodedName = urldecode($name);
@ -127,7 +142,7 @@ class Principal implements BackendInterface {
private function getPrincipalByPath(string $principalUri): ?array {
/**
* @param string[]|null $propertyFilter A list of properties to be retrieved or all if null. Is not guaranteed to always be applied and might overfetch.
*/
private function getPrincipalByPath(string $principalUri, ?array $propertyFilter = null): ?array {
// Hacky code below ... shouldn't we check the whole (principal) root collection instead?
if (str_starts_with($principalUri, RemoteUserPrincipalBackend::PRINCIPAL_PREFIX)) {