Skip to content
Pimcore 5.x User, Object, Asset and Document Authentication
Branch: master
Clone or download
solverat do not use formatted file size in content-length header, see #94 (#97)
* do not use formatted file size in content-length header, see #94

* dont use pimcore file size check to keep BC
Latest commit 9b2b2d5 May 9, 2019

README.md

Pimcore Members

Add frontend user authentication and document restriction to pimcore 5.0.

Join the chat at https://gitter.im/pimcore/pimcore Software License Latest Release Scrutinizer Travis PhpStan

Requirements

  • Pimcore 5.

Pimcore 4

Get the Pimcore4 Version here.

Features

  • Create Members in Backend
  • Allow Members to register in frontend
  • Restrict Documents, Objects and Assets to specific User Roles

Installation

Please read the installation instructions before going deep with Members!

Composer Installation

  1. Add code below to your composer.json
"require" : {
    "dachcom-digital/members" : "~2.3.0"
}

Installation via Extension Manager

After you have installed the Members Bundle via composer, open pimcore backend and go to Tools => Extension:

  • Click the green + Button in Enable / Disable row
  • Click the green + Button in Install/Uninstall row

Installation via CommandLine

After you have installed the Members Bundle via composer:

  • Execute: $ bin/console pimcore:bundle:enable MembersBundle
  • Execute: $ bin/console pimcore:bundle:install MembersBundle

Optional: Class Installation

Read more about the required classes below).

bin/console members:install:class

Route Installation

Members does not include any routes per default. Otherwise it would be hard for you to change or override included routes.

Include all Routes

# app/config/routing.yml
app:
    resource: '@MembersBundle/Resources/config/pimcore/routing/all.yml'

Just include some Routes

# app/config/routing.yml
members_auth:
    resource: '@MembersBundle/Resources/config/pimcore/routing/auth.yml'
    prefix: /{_locale}/members #change your prefix if you have to.

Class Installation

Unlike members1, this bundle does not install any classes for you any more. Since Members should be the one and only frontend authentication Bundle, we need to add the most flexibility as possible. But no worries, it's still simple to integrate.

There is also a class installer command. If your not using any special class configuration, feel free to use this command: $ bin/console members:install:class

You need two classes: User and Group. So let's create it:

User

  1. Create a class and call it MembersUser
  2. Add parent class: \MembersBundle\Adapter\User\AbstractUser
  3. Add fields:
Name Field Type Comment
userName Input
email Input Note: Do not add this field if you're using the CMF.
confirmationToken Input must set to it read only
lastLogin Date & Time must set to it read only
password Password Hide it, if you want. Note: Do not add this field if you're using the CMF.
passwordRequestedAt Date & Time must set to it read only
groups User Group This field comes with Members

membersUser is the default name, you may want to change it. Read here how to achieve that.

Customer Data Framework

If you want to use the Customer Data Framework you need to do some further work. Read more about it here.

Group

  1. Create a class and call it MembersGroup
  2. Add parent class: \MembersBundle\Adapter\Group\AbstractGroup
  3. Add fields:
Name Field Type Comment
name Input
roles Multiselection Set "Options Provider Class or Service Name" to @MembersBundle\CoreExtension\Provider\RoleOptionsProvider

membersGroup is the default name, you may want to change it. Read here how to achieve that.

Feel free to add additional fields since those are just the required ones. That's it. Members will use those classes to manage authentication and group management.

Email Configuration

You're almost there, just check the email configuration and you're good to go.


User Management: Further Information


Restrictions

Learn more about the Members Restriction feature:

Upgrade Info

Before updating, please check our upgrade notes!

Copyright and license

Copyright: DACHCOM.DIGITAL
For licensing details please visit LICENSE.md

You can’t perform that action at this time.