2017 © Pedro Peláez
 

symfony-bundle security-user

Bundle for easy integrations security user

image

youshido/security-user

Bundle for easy integrations security user

  • Saturday, November 19, 2016
  • by portey
  • Repository
  • 3 Watchers
  • 2 Stars
  • 575 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 14 Versions
  • 34 % Grown

The README.md

SecurityUser

Install via Composer:

composer require youshido/security-user, (*1)

Enable in your AppKernel.php:

new new Youshido\SecurityUserBundle\YoushidoSecurityUserBundle(),, (*2)

Create your User class:

``` php <?php, (*3)

namespace AppBundle\Entity;, (*4)

use Doctrine\ORM\Mapping as ORM; use Youshido\SecurityUserBundle\Entity\SecuredUser;, (*5)

/** * User * * @ORM\Table(name="user") * @ORM\Entity */ class User extends SecuredUser { /** * @var integer * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id;, (*6)

//your custom fields

#### Create User form (if needed): ``` php <?php namespace AppBundle\Form\Type; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; use Youshido\SecurityUserBundle\Form\Type\SecuredUserType; class UserType extends SecuredUserType { public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); $builder ->add('plan', 'entity', [ 'class' => 'AppBundle\Entity\Plan' ]) ->add('terms', 'checkbox', [ 'mapped' => false, ]) ; } public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ 'data_class' => 'AppBundle\Entity\User' ]); }

Insert to your security.yml file:

``` yaml, (*7)

providers: yuser_provider: entity: class: /* your user class */ property: email, (*8)

encoders: /* your user class */: md5, (*9)

firewalls: dev: pattern: ^/(_(profiler|wdt|error)|css|images|js)/ security: false, (*10)

default:
    pattern: ^/
    provider: yuser_provider
    anonymous: ~
    form_login:
        login_path: security.login
        check_path:  security.login_check
        success_handler: security.authentication_handler
        failure_handler: security.authentication_handler
    logout:
        path:   security.logout
        target: /

### Configure plugin (required!): ``` yaml youshido_security_user: model: /* your user class */

Available config options:

``` yaml youshido_security_user: model: /* your user class */ templates: login_form: @YoushidoSecurityUser/Security/login.html.twig register_form: @YoushidoSecurityUser/Security/register.html.twig activation_success: @YoushidoSecurityUser/Security/activation_success.html.twig, (*11)

    recovery_form: @YoushidoSecurityUser/Security/recovery.html.twig
    recovery_success: @YoushidoSecurityUser/Security/recovery_success.html.twig

    change_password_success: @YoushidoSecurityUser/Security/change_password_success.html.twig
    change_password_error: @YoushidoSecurityUser/Security/recovery_error.html.twig
    change_password_form: @YoushidoSecurityUser/Security/change_password.html.twig

    register_letter: @YoushidoSecurityUser/Letters/register_letter.html.twig
    recovery_letter: @YoushidoSecurityUser/Letters/recovery_letter.html.twig
redirects:
    register_success: homepage
mailer:
    from: from@test.com
    subject:
        recovery: Recovery letter
        register: Register letter
form:
    registration: AppBundle\Form\Type\UserType
send_mails:
    register: true
    recovery: true

```, (*12)

The Versions

19/11 2016

dev-master

9999999-dev https://github.com/Youshido/SecurityUser

Bundle for easy integrations security user

  Sources   Download

MIT

The Requires

 

by Portey Vasil

user bundle symfony security user

19/11 2016

v0.1.1

0.1.1.0 https://github.com/Youshido/SecurityUser

Bundle for easy integrations security user

  Sources   Download

MIT

The Requires

 

by Portey Vasil

user bundle symfony security user

05/09 2016

v0.1

0.1.0.0 https://github.com/Youshido/SecurityUser

Bundle for easy integrations security user

  Sources   Download

MIT

The Requires

 

by Portey Vasil

user bundle symfony security user

24/04 2016

v0.0.11

0.0.11.0 https://github.com/Youshido/SecurityUser

Bundle for easy integrations security user

  Sources   Download

MIT

The Requires

 

by Portey Vasil

user bundle symfony security user

24/04 2016

v0.0.10

0.0.10.0 https://github.com/Youshido/SecurityUser

Bundle for easy integrations security user

  Sources   Download

MIT

The Requires

 

by Portey Vasil

user bundle symfony security user

24/04 2016

v0.0.9

0.0.9.0 https://github.com/Youshido/SecurityUser

Bundle for easy integrations security user

  Sources   Download

MIT

The Requires

 

by Portey Vasil

user bundle symfony security user

22/04 2016

v0.0.8

0.0.8.0 https://github.com/Youshido/SecurityUser

Bundle for easy integrations security user

  Sources   Download

MIT

The Requires

 

by Portey Vasil

user bundle symfony security user

29/02 2016

v0.0.7

0.0.7.0 https://github.com/Youshido/SecurityUser

Bundle for easy integrations security user

  Sources   Download

MIT

The Requires

 

by Portey Vasil

user bundle symfony security user

05/02 2016

v0.0.6

0.0.6.0 https://github.com/Youshido/SecurityUser

Bundle for easy integrations security user

  Sources   Download

MIT

The Requires

 

by Portey Vasil

user bundle symfony security user

05/02 2016

v0.0.5

0.0.5.0 https://github.com/Youshido/SecurityUser

Bundle for easy integrations security user

  Sources   Download

MIT

The Requires

 

by Portey Vasil

user bundle symfony security user

04/02 2016

v0.0.4

0.0.4.0 https://github.com/Youshido/SecurityUser

Bundle for easy integrations security user

  Sources   Download

MIT

The Requires

 

by Portey Vasil

user bundle symfony security user

01/02 2016

v0.0.3

0.0.3.0 https://github.com/Youshido/SecurityUser

Bundle for easy integrations security user

  Sources   Download

MIT

The Requires

 

by Portey Vasil

user bundle symfony security user

04/11 2015

v0.0.1

0.0.1.0 https://github.com/Youshido/SecurityUser

Bundle for easy integrations security user

  Sources   Download

MIT

The Requires

 

by Portey Vasil

user bundle symfony security user

27/09 2015

v0.0.2

0.0.2.0 https://github.com/Youshido/SecurityUser

Bundle for easy integrations security user

  Sources   Download

MIT

The Requires

 

by Portey Vasil

user bundle symfony security user