Download the PHP package positibe/user-bundle without Composer
On this page you can find all versions of the php package positibe/user-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download positibe/user-bundle
More information about positibe/user-bundle
Files in positibe/user-bundle
Download positibe/user-bundle
More information about positibe/user-bundle
Files in positibe/user-bundle
Vendor positibe
Package user-bundle
Short Description Symfony Positibe User Bundle
License MIT
Homepage http://positibelabs.com/bundles/user
Package user-bundle
Short Description Symfony Positibe User Bundle
License MIT
Homepage http://positibelabs.com/bundles/user
Please rate this library. Is it a good library?
Informations about the package user-bundle
PositibeUserBundle
This bundle provide an abstract for FOSUserBundle with some Positibe integration.
Installation
To install the bundle just add the dependent bundles:
php composer.phar require positibe/user-bundle
Next, be sure to enable the bundles in your application kernel:
<?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'}
There are some abstraction for secutiry configuration:
# 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:
<?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();
}
}
All versions of user-bundle with dependencies
PHP Build Version
Package Version
The package positibe/user-bundle contains the following files
Loading the files please wait ....