# FOSUserBundle Integration API Platform Core is shipped with a bridge for [FOSUserBundle](https://github.com/FriendsOfSymfony/FOSUserBundle). If the FOSUser bundle is enabled, this bridge will use its `UserManager` to create, update and delete user resources. Note: FOSUserBundle is not well suited for APIs. We strongly encourage you to use the [Doctrine user provider](https://symfony.com/doc/current/security/entity_provider.html) shipped with Symfony or to [create a custom user provider](http://symfony.com/doc/current/security/custom_provider.html) instead of using this bundle. ## Installing the Bundle The installation procedure of the FOSUserBundle is described [in the main Symfony docs](https://symfony.com/doc/master/bundles/FOSUserBundle/index.html) You can: * Skip the [step 3 (Create your User class)](https://symfony.com/doc/master/bundles/FOSUserBundle/index.html#step-3-create-your-user-class) and use the class provided in the next paragraph to set up serialization groups the correct way * Skip the [step 4 (Configure your application's security.yml)](https://symfony.com/doc/master/bundles/FOSUserBundle/index.html#step-4-configure-your-application-s-security-yml) if you are planning to [use a JWT-based authentication using `LexikJWTAuthenticationBundle`](jwt.md) If you are using the API Platform Standard Edition, you will need to enable the form services in the symfony framework configuration options: ```yaml # app/config/config.yml framework: form: { enabled: true } ``` ## Enabling the Bridge To enable the provided bridge with FOSUserBundle, you need to add the following configuration to api-platform: ```yaml # app/config/config.yml api_platform: enable_fos_user: true ``` ## Creating a `User` Entity with Serialization Groups Here's an example of declaration of a [Doctrine ORM User class](https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/index.rst#a-doctrine-orm-user-class). You need to use serialization groups to hide some properties like `plainPassword` (only in read) and `password`. The properties shown are handled with the [`normalization_context`](serialization.md#normalization), while the properties you can modify are handled with [`denormalization_context`](serialization.md#denormalization). Create your User entity with serialization groups: ```php fullname = $fullname; return $this; } public function getFullname() { return $this->fullname; } public function isUser(UserInterface $user = null) { return $user instanceof self && $user->id === $this->id; } } ```