PHPackages                             jield-webdev/laminas-user - 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. jield-webdev/laminas-user

Abandoned → [https://github.com/LM-Commons/LmcUser](/?search=https%3A%2F%2Fgithub.com%2FLM-Commons%2FLmcUser)ArchivedLibrary[Authentication &amp; Authorization](/categories/authentication)

jield-webdev/laminas-user
=========================

A generic user registration and authentication module for Laminas. Supports Laminas\\Db and Doctrine2.

01.4k[2 PRs](https://github.com/jield-webdev/laminas-user/pulls)PHP

Since Feb 19Pushed 5y agoCompare

[ Source](https://github.com/jield-webdev/laminas-user)[ Packagist](https://packagist.org/packages/jield-webdev/laminas-user)[ RSS](/packages/jield-webdev-laminas-user/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (4)Used By (0)

ZfcUser
=======

[](#zfcuser)

[![Build Status](https://camo.githubusercontent.com/fe823368bb7fff09018754c1724b385f8b648186e8a9075e9535c57c428d31d7/68747470733a2f2f7472617669732d63692e6f72672f5a462d436f6d6d6f6e732f5a6663557365722e706e67)](https://travis-ci.org/ZF-Commons/ZfcUser)[![Code Coverage](https://camo.githubusercontent.com/817e714fd61f29c4ab4ac17279dbdc50b294f07b86a58ad4ef702960c20430c6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5a462d436f6d6d6f6e732f5a6663557365722f6261646765732f636f7665726167652e706e673f733d37643539333263373762656136346134313761633865336461353164636136646131666362323265)](https://scrutinizer-ci.com/g/ZF-Commons/ZfcUser/)[![Latest Stable Version](https://camo.githubusercontent.com/f220fc339c9e17b0296d38f22d76b76f624d0ea618b290d73829f7dae499c19f/68747470733a2f2f706f7365722e707567782e6f72672f7a662d636f6d6d6f6e732f7a66632d757365722f762f737461626c652e706e67)](https://packagist.org/packages/zf-commons/zfc-user)[![Latest Unstable Version](https://camo.githubusercontent.com/c4d5d0eac905504152eb01be81502b3f65823d1f8d25327540924620a561af8e/68747470733a2f2f706f7365722e707567782e6f72672f7a662d636f6d6d6f6e732f7a66632d757365722f762f756e737461626c652e706e67)](https://packagist.org/packages/zf-commons/zfc-user)

Created by Evan Coury and the ZF-Commons team

Introduction
------------

[](#introduction)

ZfcUser is a user registration and authentication module for Laminas. Out of the box, ZfcUser works with Laminas\\Db, however alternative storage adapter modules are available (see below). ZfcUser provides the foundations for adding user authentication and registration to your Laminas site. It is designed to be very simple and easy to extend.

More information and examples are available on the [ZfcUser Wiki](https://github.com/ZF-Commons/ZfcUser/wiki)

Versions
--------

[](#versions)

Please use below table to figure out what version of ZfcUser you should use.

ZfcUser versionSupported Zend Framework versionStatus1.x&lt;= 2.5Security-fixes only2.x&gt;= 2.6 &lt; 3bug-fixes, security-fixes3.x&gt;= 3 / LaminasNew features, bug-fixes, security-fixesStorage Adapter Modules
-----------------------

[](#storage-adapter-modules)

By default, ZfcUser ships with support for using Laminas\\Db for persisting users. However, by installing an optional alternative storage adapter module, you can take advantage of other methods of persisting users:

- [ZfcUserDoctrineORM](https://github.com/ZF-Commons/ZfcUserDoctrineORM) - Doctrine2 ORM
- [ZfcUserDoctrineMongoODM](https://github.com/ZF-Commons/ZfcUserDoctrineMongoODM) - Doctrine2 MongoDB ODM

Requirements
------------

[](#requirements)

- [Laminas](https://github.com/ZF-Commons/ZfcUser.git).

Features / Goals
----------------

[](#features--goals)

- Authenticate via username, email, or both (can opt out of the concept of username and use strictly email) \[COMPLETE\]
- User registration \[COMPLETE\]
- Forms protected against CSRF \[COMPLETE\]
- Out-of-the-box support for Doctrine2 *and* Laminas\\Db \[COMPLETE\]
- Robust event system to allow for extending \[COMPLETE\]
- Provide ActionController plugin and view helper \[COMPLETE\]

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

[](#installation)

### Main Setup

[](#main-setup)

#### By cloning project

[](#by-cloning-project)

1. Install the [ZfcBase](https://github.com/ZF-Commons/ZfcBase) ZF2 module by cloning it into `./vendor/`.
2. Clone this project into your `./vendor/` directory.

#### With composer

[](#with-composer)

1. Add this project and [ZfcBase](https://github.com/ZF-Commons/ZfcBase) in your composer.json:

    ```
    "require": {
        "zf-commons/zfc-user": "^3.0"
    }
    ```
2. Now tell composer to download ZfcUser by running the command:

    ```
    $ php composer.phar update
    ```

#### Post installation

[](#post-installation)

1. Enabling it in your `application.config.php`file.

    ```
