PHPackages                             juratitov/zfc-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. juratitov/zfc-user

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

juratitov/zfc-user
==================

A generic user registration and authentication module for ZF2. Supports multiple adapters with built-in support for Zend\\Db.

1.2.1(11y ago)028BSD-3-ClausePHPPHP &gt;=5.3.3

Since Feb 7Pushed 11y agoCompare

[ Source](https://github.com/juratitov/ZfcUser)[ Packagist](https://packagist.org/packages/juratitov/zfc-user)[ Docs](https://github.com/ZF-Commons/ZfcUser)[ RSS](/packages/juratitov-zfc-user/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (18)Versions (13)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 Zend Framework 2. Out of the box, ZfcUser works with Zend\\Db, however alternative storage adapter modules are available (see below). ZfcUser provides the foundations for adding user authentication and registration to your ZF2 site. It is designed to be very simple and easily to extend.

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

Storage Adapter Modules
-----------------------

[](#storage-adapter-modules)

By default, ZfcUser ships with support for using Zend\\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)

- [Zend Framework 2](https://github.com/zendframework/zf2) (latest master)
- [ZfcBase](https://github.com/ZF-Commons/ZfcBase) (latest master).

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* Zend\\Db \[COMPLETE\]
- Registration form protected with CAPTCHA \[IN PROGRESS\] (Needs more options)
- Robust event system to allow for extending \[IN PROGRESS\]

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": "dev-master"
    }
    ```
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.

    ```
