plugin/exo/Serializer/UserSerializer.php
private function serializePicture(User $user)
    {
        if (!empty($user->getPicture())) {
            /** @var PublicFile $file */
            $file = $this->om
                ->getRepository(PublicFile::class)
                ->findOneBy(['url' => $user->getPicture()]);

            if ($file) {
                return $this->fileSerializer->serialize($file);
            }
        }

        return null;
    }
private function serializePicture(User $user)
    {
        if (!empty($user->getPicture())) {
            /** @var PublicFile $file */
            $file = $this->om
                ->getRepository(PublicFile::class)
                ->findOneBy(['url' => $user->getPicture()]);

            if ($file) {
                return $this->fileSerializer->serialize($file);
            }
        }

        return null;
    }
private function serializePicture ( User $ user ) { if ( ! empty ( $ user -> getPicture ( ) ) ) { /** @var PublicFile $file */ $ file = $ this -> om -> getRepository ( PublicFile :: class ) -> findOneBy ( [ 'url' => $ user -> getPicture ( ) ] ) ; if ( $ file ) { return $ this -> fileSerializer -> serialize ( $ file ) ; } } return null ; }
Serialize the user picture.

@param User $user

@return array|null
Serialize the user picture .