diff --git a/README.md b/README.md index 5a34257..74c372a 100644 --- a/README.md +++ b/README.md @@ -55,10 +55,23 @@ Adds extra features to eZ Platform. Simplifies calls to `$this->isGranted()` from inside controllers and `is_granted()` from within templates when checking against eZ inner permission system (module/function/valueObject). + +* **[Authentication by e-mail](Resources/doc/email_authentication.md)** + + By activating `enable_email_authentication` flag, it will be possible for users to authenticate using their e-mail, + in addition to their username. + + ```yaml + ez_core_extra: + system: + my_siteaccess: + enable_email_authentication: true + ``` ## Requirements -EzCoreExtraBundle currently works with **eZ Publish 5.4/2014.11** (and *should work* with Netgen variant) -and eZ Platform (kernel version >=6.0). +EzCoreExtraBundle currently works eZ Platform v1 and v2 (kernel v6 and v7). + +> If you're using eZ publish 5.4/2014.11 or Netgen variant, look at `1.1` branch and/or `v1.x` releases. ## Installation This bundle is available on [Packagist](https://packagist.org/packages/lolautruche/ez-core-extra-bundle). @@ -70,6 +83,8 @@ composer require lolautruche/ez-core-extra-bundle Then add it to your application: +> `EzCoreExtraBundle` **MUST** be instanciated **AFTER** eZ bundles. + ```php // ezpublish/EzPublishKernel.php diff --git a/Resources/doc/README.md b/Resources/doc/README.md index 45fdd86..8822887 100644 --- a/Resources/doc/README.md +++ b/Resources/doc/README.md @@ -4,3 +4,4 @@ - [Template variables injection using **ExpressionLanguage**](view_parameters_expressions.md) - [View parameters providers (dynamic variables injection)](view_parameters_providers.md) - [Simplified authorization checks](simplified_auth_checks.md) +- [Authentication by e-mail](email_authentication.md) diff --git a/Resources/doc/email_authentication.md b/Resources/doc/email_authentication.md new file mode 100644 index 0000000..5ce2b8d --- /dev/null +++ b/Resources/doc/email_authentication.md @@ -0,0 +1,22 @@ +# Authentication by e-mail + +By default, eZ users can only authenticate using their username. However, using e-mail for authentication is quite a +common use case. + +EzCoreExtraBundle enables the possibility for any eZ user to authenticate against their e-mail, in addition to their username. + +You can easily activate it for your SiteAccess using the following config, where `my_siteaccess` is the name of +your SiteAccess or SiteAccess group: + +```yaml +ez_core_extra: + system: + my_siteaccess: + enable_email_authentication: true +``` + +Original behavior - authentication by username - is kept and will always have precedence (e.g. username will always +be tested first). + +> **Important note**: `EzCoreExtraBundle` **MUST** be instanciated +> **after eZ bundles** in `AppKernel`.