2017 © Pedro PelĂĄez
 

symfony-bundle user-bundle

Symfony Positibe User Bundle

image

positibe/user-bundle

Symfony Positibe User Bundle

  • Tuesday, December 5, 2017
  • by pcabreus
  • Repository
  • 1 Watchers
  • 1 Stars
  • 1 Installations
  • HTML
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 11 Versions
  • 0 % Grown

The README.md

PositibeUserBundle

This bundle provide an abstract for FOSUserBundle with some Positibe integration., (*1)

Installation

To install the bundle just add the dependent bundles:, (*2)

php composer.phar require positibe/user-bundle

Next, be sure to enable the bundles in your application kernel:, (*3)

<?php
// app/AppKernel.php
public function registerBundles()
{
    return array(
        // ...
        new FOS\UserBundle\FOSUserBundle(),
        new Positibe\Bundle\UserBundle\PositibeUserBundle(),
        // ...
    );
}

Configuration

Import all necessary configurations to your app/config/config.yml the basic configuration. # app/config/config.yml imports: - { resource: '@PositibeUserBundle/Resources/config/config.yml'}, (*4)

There are some abstraction for secutiry configuration:, (*5)

# app/config/security.yml
imports:
- { resource: '@PositibeUserBundle/Resources/config/security.yml'}

security:
    role_hierarchy:

    access_control:
        - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/admin/, role: ROLE_ADMIN }

You have to implement your own User class:, (*6)

<?php

namespace AppBundle\Entity;

use Doctrine\Common\Collections\ArrayCollection;
use FOS\UserBundle\Model\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;
use Positibe\Bundle\UserBundle\Entity\Traits\UserTrait;
use Positibe\Bundle\UserBundle\Entity\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;

/**
 * @ORM\Entity
 * @ORM\Table(name="app_user")
 *
 * @UniqueEntity({"username"})
 * @UniqueEntity({"email"})
 */
class User extends BaseUser implements UserInterface
{
    use UserTrait;

    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    public function __construct()
    {
        parent::__construct();
    }
}

The Versions

05/12 2017

dev-master

9999999-dev http://positibelabs.com/bundles/user

Symfony Positibe User Bundle

  Sources   Download

MIT

The Requires

 

user positibelabs positibe content management framework

05/12 2017
26/08 2017

1.0.0-RC9

1.0.0.0-RC9 http://positibelabs.com/bundles/user

Symfony Positibe User Bundle

  Sources   Download

MIT

The Requires

 

user positibelabs positibe content management framework

05/07 2017

1.0.0-RC8

1.0.0.0-RC8 http://positibelabs.com/bundles/user

Symfony Positibe User Bundle

  Sources   Download

MIT

The Requires

 

user positibelabs positibe content management framework

01/07 2017

1.0.0-RC7

1.0.0.0-RC7 http://positibelabs.com/bundles/user

Symfony Positibe User Bundle

  Sources   Download

MIT

The Requires

 

user positibelabs positibe content management framework

24/06 2017

1.0.0-RC6

1.0.0.0-RC6 http://positibelabs.com/bundles/user

Symfony Positibe User Bundle

  Sources   Download

MIT

The Requires

 

user positibelabs positibe content management framework

04/06 2017

1.0.0-RC5

1.0.0.0-RC5 http://positibelabs.com/bundles/user

Symfony Positibe User Bundle

  Sources   Download

MIT

The Requires

 

user positibelabs positibe content management framework

02/05 2017

1.0.0-RC4

1.0.0.0-RC4 http://positibelabs.com/bundles/user

Symfony Positibe User Bundle

  Sources   Download

MIT

The Requires

 

user positibelabs positibe content management framework

25/04 2017

1.0.0-RC3

1.0.0.0-RC3 http://positibelabs.com/bundles/user

Symfony Positibe User Bundle

  Sources   Download

MIT

The Requires

 

user positibelabs positibe content management framework

11/04 2017

1.0.0-beta2

1.0.0.0-beta2 http://positibelabs.com/bundles/user

Symfony Positibe User Bundle

  Sources   Download

MIT

The Requires

 

user positibelabs positibe content management framework

02/04 2017

1.0.0-beta1

1.0.0.0-beta1 http://positibelabs.com/bundles/user

Symfony Positibe User Bundle

  Sources   Download

MIT

The Requires

 

user positibelabs positibe content management framework