From bd691ec9bb42ce02b875a277e1d670297128457c Mon Sep 17 00:00:00 2001 From: bscheshirwork Date: Wed, 12 Sep 2018 18:03:25 +0300 Subject: [PATCH] Additional info on the migration guide from Dektrium tools --- .../migration-guide-from-dektrium-tools.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/installation/migration-guide-from-dektrium-tools.md b/docs/installation/migration-guide-from-dektrium-tools.md index 1f4a963..fc026b3 100644 --- a/docs/installation/migration-guide-from-dektrium-tools.md +++ b/docs/installation/migration-guide-from-dektrium-tools.md @@ -53,6 +53,18 @@ In `config/web.php` remove *module > rbac* configuration and change the *modules * If you had `modelMap` customization you have to replace them with `classMap`. * In your extended model replace the `BaseUser` inheritance from `dektrium\user\models\User` to `Da\User\Model\User` * If you had controller remapping replace the inheritance from `dektrium\user\controllers\XX` to `Da\User\Controller\XX` +* Some properties has been renamed: from `enableConfirmation` to `enableEmailConfirmation`; from `enableGeneratingPassword` to `generatePasswords` +* Restore Identity url rule has been renamed: from `/user/admin/switch` to `/user/admin/switch-identity` +* Restore Identity session checker has changes: from +```php +if (Yii::$app->session->has(\dektrium\user\controllers\AdminController::ORIGINAL_USER_SESSION_KEY)) +``` +to +```php +/** @var Da\User\Module $module */ +$module = Yii::$app->getModule('user'); +if(Yii::$app->session->has($module->switchIdentitySessionKey)) +``` ## Rbac migrations