2017 © Pedro Peláez
 

symfony-bundle light-cms-user-bundle

Users module of LigthCMS bundle

image

fulgurio/light-cms-user-bundle

Users module of LigthCMS bundle

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

LightCMSUserBundle

This bundle for LightCMS is the user manager bundle., (*1)

To use it, just follow these steps :, (*2)

  1. Install LightCMSBundle and configure it
  2. Download this bundle
  3. Enable the Bundle
  4. Import routing
  5. Configure your yml files
  6. Add new user account

Step 1: Install LightCMSBundle and configure it

Follow the installation doc to install LightCMS., (*3)

Step 2: Download this bundle

Add this line into your composer.json file, (*4)

``` json { "require": { "fulgurio/light-cms-user-bundle" : "dev-master" } }, (*5)


After, just launch composer, it will load all dependencies ``` bash $ ./composer update

Step 3: Enable the bundle

Finally, enable the bundle in the kernel:, (*6)

``` php <?php // app/AppKernel.php, (*7)

public function registerBundles() { $bundles = array( // ... new Fulgurio\LightCMSUserBundle\FulgurioLightCMSUserBundle(), ); }, (*8)


### Step 4: Import routing file You need to put the following line before FulgurioLightCMSBundle routing : ``` yaml # app/config/routing.yml FulgurioLightCMSUserBundle: resource: "@FulgurioLightCMSUserBundle/Resources/config/routing.yml" prefix: /

Step 5: Configure your yml files

You need to set on the anonymous access, and to limit admin access. Edit config/security.yml file and put the following configuration : ``` yaml security: encoders: Symfony\Component\Security\Core\User\UserInterface: plaintext providers: lightcms: entity: class: Fulgurio\LightCMSUserBundle\Entity\User property: username firewalls: lightcms_secured_area: form_login: provider: lightcms login_path: /login check_path: /login_check logout: path: /logout target: / anonymous: ~ access_control: - { path: ^/admin/, roles: ROLE_ADMIN }, (*9)


### Step 6: Add new user account Now, you need to add your first user. To do that, there's a command with the console : ``` bash $ ./app/console user:add user:add username password email [role]

Just type your login informations, like : bash ./app/console user:add admin mypassword admin@foo.bar ROLE_ADMIN, (*10)

Note: you need to use the role which is allowed to access to /admin, in this document, it's ROLE_ADMIN. Actually, roles are unused, there's no difference between ROLE_USER or ROLE_ADMIN., (*11)

The Versions

19/02 2018

dev-master

9999999-dev http://github.com/fulgurio/LightCMSUserBundle

Users module of LigthCMS bundle

  Sources   Download

GPL GPL-1.0-or-later

The Requires

 

user manager lightcms