PHPackages                             evilband7/rbac-user-doctrine-orm - 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. evilband7/rbac-user-doctrine-orm

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

evilband7/rbac-user-doctrine-orm
================================

A module that integrate zfc-rbac with zfc-user

35622PHP

Since Sep 13Pushed 9y ago1 watchersCompare

[ Source](https://github.com/evilband7/RbacUserDoctrineOrm)[ Packagist](https://packagist.org/packages/evilband7/rbac-user-doctrine-orm)[ RSS](/packages/evilband7-rbac-user-doctrine-orm/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

RbacUserDoctrineOrm
===================

[](#rbacuserdoctrineorm)

ZF Module which in integrate [ZfcUserDoctrineOrm](https://github.com/ZF-Commons/ZfcUserDoctrineORM) with [ZfcRbac](https://github.com/ZF-Commons/zfc-rbac). Inspired by

Dependencies
------------

[](#dependencies)

- PHP &gt;= 5.6
- Zend Framework 3 or &gt;= 2.7
- [ZfcUser](https://github.com/ZF-Commons/ZfcUser)
- [ZfcUserDoctrineOrm](https://github.com/ZF-Commons/ZfcUserDoctrineORM)
- [DoctrineModule](https://github.com/doctrine/DoctrineModule)
- [DoctrineORMModule](https://github.com/doctrine/DoctrineORMModule)
- [ZfcRbac](https://github.com/ZF-Commons/zfc-rbac)

Installation
------------

[](#installation)

Install RbacUserDoctrineOrm Module using composer

```
{
    ...,
    "require": {
        ...,
        "evilband7/rbac-user-doctrine-orm" : "~0.1 || dev-master"
    }
}

```

ps. If you using **ZF2**, please add **zf-commons/zfc-user-doctrine-orm** into your composer dependency. For **ZF3**, please install **ZfcUserDoctrineOrm** manually by cloning module into your project.

for ZF3 project, your composer should look like this.

```
{
    ...,
    "require": {
        ...,
        "zendframework/zend-mvc" : "~3.0",
        "zendframework/zend-servicemanager" : "~3.0",
        "zendframework/zend-eventmanager" : "~3.0",
        "zendframework/zend-router" : "~3.0",
        "zf-commons/zfc-rbac" : "~2.5 || dev-master",
        "zf-commons/zfc-user" : "~2.0 || 2.x-dev",
        "doctrine/doctrine-module" : "~1.0 || dev-master",
        "doctrine/doctrine-orm-module" : "~1.0 || dev-master",
        "evilband7/rbac-user-doctrine-orm" : "~0.1 || dev-master"
    }
}

```

Then set up your Modules in `config/application/application.config.php`, something like

```
'modules' => array(
    'DoctrineModule',
    'DoctrineORMModule',
    'ZfcBase',
    'ZfcUser',
    'ZfcUserDoctrineORM',
    'RbacUserDoctrineOrm',
    'Application',
),

```

Now, you can use `doctrine-module` to to set up your database tables (config your connection first [Doctrine Connection Settings](https://github.com/doctrine/DoctrineORMModule#connection-settings)).

```
vendor/bin/doctrine-module orm:schema-tool:update --dump-sql

```

If SQL looks okay, do:

```
vendor/bin/doctrine-module orm:schema-tool:update --force

```

Roles
=====

[](#roles)

RbacUserDoctrineOrm provide 2 sources of roles.

1. `dbRoles` field which is hierarchy roles. You can define dbRoles in database tables `( auth_user, auth_role, auth_permission, auth_users_roles and auth_roles_permissions )`
2. `providerRoles` field which is comma separated in `auth_user.provider_roles` column. Roles from this source will not work unless you provide your own [RoleProvder](https://github.com/ZF-Commons/zfc-rbac/blob/master/docs/03.%20Role%20providers.md)

Customize User Entity
=====================

[](#customize-user-entity)

Fist, copy config/rbac-user-doctrine.global.php.dist to autoload folder. (don't forget to remove .dist) Then customize your entity class name

```
 return [
      'rbac-user-doctrine-orm' => [
          'enable_default_user_entity' => false,
      ],
      'zfcuser' => [
          'userEntityClass' => 'YourUserEntityClass' //TODO
      ],
  ];

```

and your User class must extends `RbacUserDoctrineOrm\Domain\AbstractRbacUser`

TODO
====

[](#todo)

- need more test on different version on depended module
- more documentation
- will release 0.x version soon.

Author
======

[](#author)

Mr. Siwapun Siwaporn

feel free to ask or suggest me. :)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/db6f49d2759960b26bef5411ce1f5aa46e306ab8ee73b7259649a311b697be8f?d=identicon)[evilband7](/maintainers/evilband7)

---

Top Contributors

[![mapkuff](https://avatars.githubusercontent.com/u/3684920?v=4)](https://github.com/mapkuff "mapkuff (18 commits)")

### Embed Badge

![Health badge](/badges/evilband7-rbac-user-doctrine-orm/health.svg)

```
[![Health](https://phpackages.com/badges/evilband7-rbac-user-doctrine-orm/health.svg)](https://phpackages.com/packages/evilband7-rbac-user-doctrine-orm)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
