2017 © Pedro Peláez
 

library user-light

Light user handling bundle for Symfony2

image

unknown/user-light

Light user handling bundle for Symfony2

  • Friday, April 3, 2015
  • by unknown.opensource
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Features

This bundle provides you with:, (*1)

  • reason to move on from php 5.3
  • code base of 1k+ lines including 25+ phpspec examples
  • symfony2 security configuration
  • symfony2 security configuration for partially protected sites
  • symfony2 firewall
  • User entity for Doctrine ORM
  • login controller
  • login template
  • login event logger

Issues and feature requests are tracked in the Github issue tracker https://github.com/unknown-opensource/user-light/issues, (*2)

Installation

  1. To install this bundle with Composer, just add the following to your composer.json file:, (*3)

    require: { ... "unknown/user-light": "1.0.4" }, (*4)

  2. Then register the bundle in AppKernel::registerBundles(), (*5)

    $bundles = array( ... new Unknown\Bundle\ReportBundle\UnknownUserLightBundle(), );, (*6)

  3. Include security configuration., (*7)

    imports: - { resource: @UnknownUserLightBundle/Resources/config/security.yml }, (*8)

Custom User Entity

To assign custom user entity for firewall use bundle configuration., (*9)

Partial bundle configuration:, (*10)

unknown_user_light:
    user_entity_class: Acme\CustomBundle\Entity\User

Custom Login Event Logging

To store login events in database supply record class in bundle configuration. Supplied class should implement Unknown\Bundle\UserLightBundle\Entity\LoginRecordInterface interface., (*11)

Partial bundle configuration:, (*12)

unknown_user_light:
    login_record_class: Acme\CustomBundle\Entity\LoginRecord

Custom Login Theme

Default bundle configuration looks for ::login.html.twig template. However, there is already provided template which can be used by configuring bundle with following:, (*13)

unknown_user_light:
    login_template: UserLightBundle::login.html.twig

The Versions