This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Provides a user and role entity to work with ZfcUser, Doctrine 2 and BjyAuthorize

1.0 2016-12-10 15:14 UTC

This package is auto-updated.

Last update: 2021-10-19 18:41:28 UTC


This module provides configuration and entities for ZfcUser, DoctrineORM and BjyAuthorize. The user entity also implements the LocaleUserInterface required by xelax90/zf2-language-route.


Installation of XelaxUserModule uses composer. For composer documentation, please refer to getcomposer.org.

composer require xelax90/zf-user-module

Then add XelaxLanguageRoute to your config/application.config.php and run the doctrine schema update to create the database table:

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

Now copy the provided vendor/xelax90/zf-user-module/config/xelax-user-module.global.php into your config/autoload directory. This file provides the basic configuration for ZfcUser, DoctrineORM and BjyAuthorize to work with this module. This file does not contain all ZfcUser configuration options. Please refer to the ZfcUser documentation or configuration for more details.


You can configure this module in the config/autoload/xelax-user-module.global.php file. All options are described there.

The user state in ZfcUser is enabled and is treated as a bitmask. The least significant bit is always the 'Login Allowed' state. Other modules can use other bits to store additional information. It is assumed, that only fife bits are used. You can adjust this number in the allowed_login_states configuration option.

Custom user entity

If you want to add attributes to the user entity, you can simply follow these steps:

  1. Create your entity in your namespace and subclass \XelaxUserEntity\Entity\User. Don't forget the Doctrine annotations
  2. Change user_entity_class configuration option in config/autoload/xelax-user-entity.global.php to your entity class