PHPackages                             imatic/user-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. imatic/user-bundle

ActiveSymfony-bundle[Authentication &amp; Authorization](/categories/authentication)

imatic/user-bundle
==================

Imatic User Bundle

v5.0.0(4y ago)21.7k1[3 PRs](https://github.com/imatic/user-bundle/pulls)MITPHPPHP &gt;=7.4CI passing

Since Jun 26Pushed 4mo ago6 watchersCompare

[ Source](https://github.com/imatic/user-bundle)[ Packagist](https://packagist.org/packages/imatic/user-bundle)[ Docs](http://imatic.cz)[ RSS](/packages/imatic-user-bundle/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (16)Versions (37)Used By (0)

[![Build Status](https://camo.githubusercontent.com/60fc40767e1d9fc6a911dd87842661409ac4760475f89ef7540cfe81651fd017/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f696d617469632f757365722d62756e646c652e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/imatic/user-bundle)

[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](LICENSE)ImaticUserBundle
----------------

[](#imaticuserbundle)

### Roles

[](#roles)

#### Global roles

[](#global-roles)

##### Configuration

[](#configuration)

```
# app/config/security.yml

security:
    # ...

    role_hierarchy:
        ROLE_ADMIN:       ROLE_USER
        ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
```

##### Translation

[](#translation)

Global roles are translated using the "roles" domain.

#### Model roles

[](#model-roles)

##### Configuration

[](#configuration-1)

```
# app/config/config.yml

# Imatic user
imatic_user:
    # ...
    security:
        role:
            model:
                namespaces:
                    includes:
                        - App
                    excludes:
                        - AppExampleBundle\Entity\Example   # exclude single entity
                        - AppFooBundle\Entity               # exclude all entities
```

### Installation

[](#installation)

#### 1. Generate AppUserBundle

[](#1-generate-appuserbundle)

Generate and enable a local bundle called AppUserBundle.

This bundle will contain user-related entities and fixtures.

#### 2. Download ImaticUserBundle using composer

[](#2-download-imaticuserbundle-using-composer)

```
"require": {
    # ...
    "imatic/user-bundle": "^3.0"
}
```

#### 3. Enable the bundle

[](#3-enable-the-bundle)

```
