2017 © Pedro Peláez
 

symfony-bundle user-bundle

Symfony User Bundle

image

tangoman/user-bundle

Symfony User Bundle

  • Sunday, April 8, 2018
  • by Tangoman
  • Repository
  • 0 Watchers
  • 1 Stars
  • 118 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 8 Versions
  • 1 % Grown

The README.md

TangoMan User Bundle

TangoMan User Bundle provides basis for user management., (*1)

Installation

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:, (*2)

$ composer require tangoman/user-bundle

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation., (*3)

Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the app/AppKernel.php file of your project:, (*4)

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    // ...

    public function registerBundles()
    {
        $bundles = array(
            // ...
            new TangoMan\UserBundle\TangoManUserBundle(),
        );

        // ...
    }
}

Step 3: Configure UserBundle routes

Enable UserBundle controllers by adding following code in the app/config/routing.yml file of your project., (*5)

tangoman_user:
    resource: "@TangoManUserBundle/Controller/"
    type:     annotation

Step 4: Configure Symfony firewall

Enable UserBundle to handle user login/logout by adding following code in the app/config/security.yml file of your project., (*6)

security:
    firewalls:
        admin:
            anonymous: ~
            provider: database
            pattern: ^/
            form_login:
                login_path: app_login
                check_path: app_check
                default_target_path: homepage
            logout:
                path: app_logout
                target: homepage
                invalidate_session: true

Step 5: Configure UserBundle parameters

UserBundle need these settings to handle user registration, password reset emails., (*7)

Add following code in the app/config/parameters.yml file of your project., (*8)

parameters:
    site_name:   "FooBar"
    site_author: "TangoMan"
    mailer_from: "tangoman@localhost.dev"

Step 6: Update Twig Configuration

Enable twig to handle global variables by adding following code in the app/config/config.yml file of your project., (*9)

# Twig Configuration
twig:
    globals:
        site_name:   "%site_name%"
        site_author: "%site_author%"
        mailer_from: "%mailer_from%"

Step 7: Create User entity

Your User entity must extend TangoMan\UserBundle\Model\User class., (*10)

Your User entity must implement getRoles() method., (*11)

<?php

namespace AppBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use TangoMan\UserBundle\Model\User as TangoManUser;

/**
 * Class User
 * @ORM\Entity(repositoryClass="AppBundle\Repository\UserRepository")
 * @ORM\Table(name="user")
 */
class User extends TangoManUser
{
    // ...

    private $roles;

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

    public function getRoles()
    {
        return $this->roles;
    }

}

Step 8: Base template

Your base template must be named as the following : base.html.twig, (*12)

Note

If you find any bug please report here : Issues, (*13)

License

Copyright (c) 2018 Matthias Morin, (*14)

License Distributed under the MIT license., (*15)

If you like TangoMan User Bundle please star! And follow me on GitHub: TangoMan75 ... And check my other cool projects., (*16)

Matthias Morin | LinkedIn, (*17)

The Versions

08/04 2018

dev-master

9999999-dev

Symfony User Bundle

  Sources   Download

MIT GPL-3.0

The Requires

 

by Matthias Morin

user bootstrap bundle symfony tangoman

08/04 2018

1.0.6

1.0.6.0

Symfony User Bundle

  Sources   Download

MIT

The Requires

 

by Matthias Morin

user bootstrap bundle symfony tangoman

07/11 2017

1.0.5

1.0.5.0

Symfony User Bundle

  Sources   Download

MIT

The Requires

 

by Matthias Morin

user bootstrap bundle symfony tangoman

06/11 2017

1.0.4

1.0.4.0

Symfony User Bundle

  Sources   Download

MIT

The Requires

 

by Matthias Morin

user bootstrap bundle symfony tangoman

31/08 2017

1.0.3

1.0.3.0

Symfony User Bundle

  Sources   Download

GPL-3.0

The Requires

 

by Matthias Morin

user bootstrap bundle symfony tangoman

30/08 2017

1.0.2

1.0.2.0

Symfony User Bundle

  Sources   Download

GPL-3.0

The Requires

 

by Matthias Morin

user bootstrap bundle symfony tangoman

29/08 2017

1.0.1

1.0.1.0

Symfony User Bundle

  Sources   Download

GPL-3.0

The Requires

 

by Matthias Morin

user bundle symfony tangoman

21/08 2017

1.0.0

1.0.0.0

Symfony User Bundle

  Sources   Download

GPL-3.0

The Requires

 

by Matthias Morin

user bundle symfony tangoman