From bc027f100face86de4d9df64a0a0df60990075ae Mon Sep 17 00:00:00 2001 From: Alec Pritchard Date: Tue, 6 Feb 2018 17:42:45 +0000 Subject: [PATCH] Improved docs to clarify some grey areas with config for Yii2 Basic Hit some snags, helping out the next guy... --- docs/index.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/index.md b/docs/index.md index 3547ea3..29667a6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -110,10 +110,27 @@ Once we have it installed, we have to configure it on your `config.php` file. 'modules' => [ 'user' => [ 'class' => Da\User\Module::class, + // ...other configs from here: [Configuration Options](installation/configuration-options.md), e.g. + // 'generatePasswords' => true, + // 'switchIdentitySessionKey' => 'myown_usuario_admin_user_key', ] ] ``` +NOTE: If you are using the Yii2 Basic Template, make sure you remove this (default user model config) from your `config.php`, +i.e. `config/web.php` file: + +``` +'components' => [ + 'user' => [ + 'identityClass' => 'app\models\User', + 'enableAutoLogin' => true, + ], +], +``` + +This will ensure the proper functionality of login/guest user detection etc. + Configuration may differ from template to template, the following are some guidelines for sidekit app template and the official Yii2 advanced application template: