Login extension for MidnightCMS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Configuration
Controller
DependencyInjection
Entity
Form
Resources
Tests/Controller
Type
LICENSE
README.md
VFouCmsLoginBundle.php
composer.json

README.md

Installation

install bundle VFouCmsLoginBundle via Composer :

composer require midnightcms/login

in app/AppKernel.php :

$bundles = [
    new FOS\UserBundle\FOSUserBundle(),
    new VFou\Cms\LoginBundle\VFouCmsLoginBundle(),
]

in app/config/config.yml :

imports:
    # ...
    - { resource: "@VFouCmsLoginBundle/Resources/config/config.yml" }

app/config/routing.yml :

# insert before everything
vfou_cms_login_user:
    resource: "@VFouCmsLoginBundle/Controller/UserController.php"
    type:     annotation
# insert after vfou_cms_admin
vfou_cms_login:
    resource: "@VFouCmsLoginBundle/Controller/"
    type:     annotation
    prefix:   /midnightCMS
# insert just before vfou_cms_main
vfou_cms_login_front:
    resource: "@VFouCmsLoginBundle/Resources/config/routing.yml"
    prefix:   /

Don't forget to update the schema :

php bin/console doctrine:schema:update --force

And install the assets :

php bin/console assets:install --symlink --relative

And clear the cache :

php bin/console cache:clear --env=prod

Usage

This extension will add 'Register','Login' and 'Logout' page types, a new toolbar menu labelled "Users" and three templates into your MidnightCMS backend.

  • The "Users" tab will contain every frontend user that has been signed up into your site. You can create new users but there is no way for now to create one with a password.
  • The three pages types that will be added is for managing users in frontend : they can sign up if you have a 'register' page, and they can connect and disconnect with the 'login' and 'logout' types. The "display mode" functionnality will run with the users connection status.
  • The three templates are for registering and login forms, and the last is displayed when you desactivates the registering in the "configuration" tab.
  • This extension adds a "Disable registration" option in your "configuration" tab. When you check this configuration the template "Register : Disabled form" will be displayed instead of the "Register : Form" template.

License

This bundle is under the MIT license. See the complete license in the bundle

Credits

This bundle uses some other bundles and libraries such as :

  • FOSUserBundle Bundle

Icons credit :