From c69697ef5c3e32d5d5e84ae97625cd671072c55e Mon Sep 17 00:00:00 2001 From: Vanterbit Date: Thu, 28 Dec 2023 13:13:19 +0200 Subject: [PATCH] change use --- README.md | 28 +++++++++---------- UserManagementModule.php | 8 +++--- components/AbstractItemEvent.php | 2 +- components/AuthHelper.php | 12 ++++---- components/GhostAccessControl.php | 6 ++-- components/GhostHtml.php | 6 ++-- components/GhostMenu.php | 6 ++-- components/GhostNav.php | 6 ++-- components/UserAuthEvent.php | 10 +++---- components/UserConfig.php | 6 ++-- components/UserIdentity.php | 4 +-- composer.json | 12 ++++---- controllers/AuthController.php | 20 ++++++------- controllers/AuthItemGroupController.php | 12 ++++---- controllers/PermissionController.php | 20 ++++++------- controllers/RoleController.php | 20 ++++++------- controllers/UserController.php | 12 ++++---- controllers/UserPermissionController.php | 12 ++++---- controllers/UserVisitLogController.php | 12 ++++---- ...40809_072112_insert_superadmin_to_user.php | 2 +- ..._insert_common_permisison_to_auth_item.php | 2 +- ...7_001649_create_basic_user_permissions.php | 8 +++--- models/User.php | 18 ++++++------ models/UserVisitLog.php | 8 +++--- models/forms/ChangeOwnPasswordForm.php | 6 ++-- models/forms/ConfirmEmailForm.php | 6 ++-- models/forms/LoginForm.php | 8 +++--- models/forms/PasswordRecoveryForm.php | 6 ++-- models/forms/RegistrationForm.php | 8 +++--- models/rbacDB/AbstractItem.php | 8 +++--- models/rbacDB/AuthItemGroup.php | 4 +-- models/rbacDB/Permission.php | 4 +-- models/rbacDB/Role.php | 4 +-- models/rbacDB/Route.php | 4 +-- models/rbacDB/search/AbstractItemSearch.php | 8 +++--- models/rbacDB/search/AuthItemGroupSearch.php | 4 +-- models/rbacDB/search/PermissionSearch.php | 2 +- models/rbacDB/search/RoleSearch.php | 2 +- models/search/UserSearch.php | 6 ++-- models/search/UserVisitLogSearch.php | 8 +++--- views/auth-item-group/_form.php | 4 +-- views/auth-item-group/create.php | 4 +-- views/auth-item-group/index.php | 10 +++---- views/auth-item-group/update.php | 4 +-- views/auth-item-group/view.php | 4 +-- views/auth/changeOwnPassword.php | 4 +-- views/auth/changeOwnPasswordSuccess.php | 2 +- views/auth/confirmEmail.php | 4 +-- views/auth/confirmEmailSuccess.php | 4 +-- views/auth/login.php | 6 ++-- views/auth/passwordRecovery.php | 4 +-- views/auth/passwordRecoverySuccess.php | 2 +- views/auth/registration.php | 4 +-- .../registrationWaitForEmailConfirmation.php | 4 +-- views/layouts/loginLayout.php | 2 +- views/mail/emailConfirmationMail.php | 2 +- views/mail/passwordRecoveryMail.php | 2 +- views/mail/registrationEmailConfirmation.php | 2 +- views/permission/_form.php | 6 ++-- views/permission/create.php | 4 +-- views/permission/index.php | 14 +++++----- views/permission/update.php | 4 +-- views/permission/view.php | 4 +-- views/role/_form.php | 6 ++-- views/role/create.php | 4 +-- views/role/index.php | 14 +++++----- views/role/update.php | 4 +-- views/role/view.php | 6 ++-- views/user-permission/set.php | 8 +++--- views/user-visit-log/index.php | 8 +++--- views/user-visit-log/view.php | 4 +-- views/user/_form.php | 8 +++--- views/user/_search.php | 2 +- views/user/changePassword.php | 4 +-- views/user/create.php | 4 +-- views/user/index.php | 20 ++++++------- views/user/update.php | 8 +++--- views/user/view.php | 10 +++---- 78 files changed, 275 insertions(+), 275 deletions(-) diff --git a/README.md b/README.md index 119470fa..4725edb2 100644 --- a/README.md +++ b/README.md @@ -22,13 +22,13 @@ The preferred way to install this extension is through [composer](http://getcomp Either run ``` -composer require webvimark/module-user-management +composer require vanterbit/module-user-management ``` or add ``` -"webvimark/module-user-management": "^1" +"vanterbit/module-user-management": "^1" ``` to the require section of your `composer.json` file. @@ -42,18 +42,18 @@ Configuration 'components'=>[ 'user' => [ - 'class' => 'webvimark\modules\UserManagement\components\UserConfig', + 'class' => 'vanterbit\modules\UserManagement\components\UserConfig', // Comment this if you don't want to record user logins 'on afterLogin' => function($event) { - \webvimark\modules\UserManagement\models\UserVisitLog::newVisitor($event->identity->id); + \vanterbit\modules\UserManagement\models\UserVisitLog::newVisitor($event->identity->id); } ], ], 'modules'=>[ 'user-management' => [ - 'class' => 'webvimark\modules\UserManagement\UserManagementModule', + 'class' => 'vanterbit\modules\UserManagement\UserManagementModule', // 'enableRegistration' => true, @@ -98,8 +98,8 @@ To see full list of options check *UserManagementModule* file 'modules'=>[ 'user-management' => [ - 'class' => 'webvimark\modules\UserManagement\UserManagementModule', - 'controllerNamespace'=>'vendor\webvimark\modules\UserManagement\controllers', // To prevent yii help from crashing + 'class' => 'vanterbit\modules\UserManagement\UserManagementModule', + 'controllerNamespace'=>'vendor\vanterbit\modules\UserManagement\controllers', // To prevent yii help from crashing ], ], @@ -109,7 +109,7 @@ To see full list of options check *UserManagementModule* file ```php -./yii migrate --migrationPath=vendor/webvimark/module-user-management/migrations/ +./yii migrate --migrationPath=vendor/vanterbit/module-user-management/migrations/ ``` @@ -121,7 +121,7 @@ public function behaviors() { return [ 'ghost-access'=> [ - 'class' => 'webvimark\modules\UserManagement\components\GhostAccessControl', + 'class' => 'vanterbit\modules\UserManagement\components\GhostAccessControl', ], ]; } @@ -134,8 +134,8 @@ Where you can go ```php false, @@ -233,7 +233,7 @@ Events can be handled via config file like following 'modules'=>[ 'user-management' => [ - 'class' => 'webvimark\modules\UserManagement\UserManagementModule', + 'class' => 'vanterbit\modules\UserManagement\UserManagementModule', 'on afterRegistration' => function(UserAuthEvent $event) { // Here you can do your own stuff like assign roles, send emails and so on }, @@ -249,7 +249,7 @@ FAQ **Question**: Do you have API docs? -**Answer**: Check this one http://opensource.id5.com.br/webvimark/doc/index.html (Credits to [lukBarros](https://github.com/lukBarros)) +**Answer**: Check this one http://opensource.id5.com.br/vanterbit/doc/index.html (Credits to [lukBarros](https://github.com/lukBarros)) **Question**: I want users to register and login with they e-mails! Mmmmm... And they should confirm it too! @@ -257,7 +257,7 @@ FAQ **Question**: I want to have profile for user with avatar, birthday and stuff. What should I do ? -**Answer**: Profiles are to project-specific, so you'll have to implement them yourself (but you can find example here - https://github.com/webvimark/user-management/wiki/Profile-and-custom-registration). Here is how to do it without modifying this module +**Answer**: Profiles are to project-specific, so you'll have to implement them yourself (but you can find example here - https://github.com/vanterbit/user-management/wiki/Profile-and-custom-registration). Here is how to do it without modifying this module 1) Create table and model for profile, that have user_id (connect with "user" table) diff --git a/UserManagementModule.php b/UserManagementModule.php index 75717919..13fbf474 100644 --- a/UserManagementModule.php +++ b/UserManagementModule.php @@ -1,6 +1,6 @@ i18n->translations['modules/user-management/*'] = [ 'class' => 'yii\i18n\PhpMessageSource', 'sourceLanguage' => 'en', - 'basePath' => '@vendor/webvimark/module-user-management/messages', + 'basePath' => '@vendor/vanterbit/module-user-management/messages', 'fileMap' => [ 'modules/user-management/back' => 'back.php', 'modules/user-management/front' => 'front.php', diff --git a/components/AbstractItemEvent.php b/components/AbstractItemEvent.php index d5afecf1..63d9eb87 100644 --- a/components/AbstractItemEvent.php +++ b/components/AbstractItemEvent.php @@ -1,5 +1,5 @@ ['xvetx\modules\UserManagement\components\AuthHelper', 'layoutHandler'], + * 'on beforeAction'=>['vanterbit\modules\UserManagement\components\AuthHelper', 'layoutHandler'], * * @param \yii\base\ActionEvent $event */ diff --git a/components/GhostAccessControl.php b/components/GhostAccessControl.php index fd7d7e5b..cfc1828a 100644 --- a/components/GhostAccessControl.php +++ b/components/GhostAccessControl.php @@ -1,9 +1,9 @@ User::canRoute($item['url') will be added * - * @package webvimark\modules\UserManagement\components + * @package vanterbit\modules\UserManagement\components */ class GhostMenu extends Menu { diff --git a/components/GhostNav.php b/components/GhostNav.php index 2417705e..d95ce1bd 100644 --- a/components/GhostNav.php +++ b/components/GhostNav.php @@ -1,7 +1,7 @@ User::canRoute($item['url') will be added * - * @package webvimark\modules\UserManagement\components + * @package vanterbit\modules\UserManagement\components */ class GhostNav extends Nav { diff --git a/components/UserAuthEvent.php b/components/UserAuthEvent.php index c713a20e..5a285f91 100644 --- a/components/UserAuthEvent.php +++ b/components/UserAuthEvent.php @@ -1,10 +1,10 @@ 'webvimark\modules\UserManagement\models\User', + 'targetClass' => 'vanterbit\modules\UserManagement\models\User', 'targetAttribute' => 'username', ], diff --git a/models/rbacDB/AbstractItem.php b/models/rbacDB/AbstractItem.php index fae8ae59..950c68dd 100644 --- a/models/rbacDB/AbstractItem.php +++ b/models/rbacDB/AbstractItem.php @@ -1,9 +1,9 @@ diff --git a/views/auth-item-group/create.php b/views/auth-item-group/create.php index f1214c58..8c21c1b6 100644 --- a/views/auth-item-group/create.php +++ b/views/auth-item-group/create.php @@ -1,11 +1,11 @@ title = UserManagementModule::t('back', 'Creating permission group'); diff --git a/views/auth-item-group/index.php b/views/auth-item-group/index.php index 51a37134..331af48f 100644 --- a/views/auth-item-group/index.php +++ b/views/auth-item-group/index.php @@ -1,19 +1,19 @@ title = UserManagementModule::t('back', 'Permission groups'); diff --git a/views/auth-item-group/update.php b/views/auth-item-group/update.php index 1d3520c7..09f9d50c 100644 --- a/views/auth-item-group/update.php +++ b/views/auth-item-group/update.php @@ -1,11 +1,11 @@ title = UserManagementModule::t('back', 'Editing permission group') . ': ' . $model->name; diff --git a/views/auth-item-group/view.php b/views/auth-item-group/view.php index b3b289a3..2e8bb693 100644 --- a/views/auth-item-group/view.php +++ b/views/auth-item-group/view.php @@ -1,12 +1,12 @@ title = $model->name; diff --git a/views/auth/changeOwnPassword.php b/views/auth/changeOwnPassword.php index 9985fec8..fe22dfdd 100644 --- a/views/auth/changeOwnPassword.php +++ b/views/auth/changeOwnPassword.php @@ -1,12 +1,12 @@ title = UserManagementModule::t('back', 'Change own password'); diff --git a/views/auth/changeOwnPasswordSuccess.php b/views/auth/changeOwnPasswordSuccess.php index 88e0a4f9..49f6ae79 100644 --- a/views/auth/changeOwnPasswordSuccess.php +++ b/views/auth/changeOwnPasswordSuccess.php @@ -1,6 +1,6 @@ title = UserManagementModule::t('front', 'Confirm E-mail'); diff --git a/views/auth/confirmEmailSuccess.php b/views/auth/confirmEmailSuccess.php index 7bd4c0e7..8a0c822a 100644 --- a/views/auth/confirmEmailSuccess.php +++ b/views/auth/confirmEmailSuccess.php @@ -1,11 +1,11 @@ title = UserManagementModule::t('front', 'E-mail confirmed'); diff --git a/views/auth/login.php b/views/auth/login.php index 25d7b088..a851d625 100644 --- a/views/auth/login.php +++ b/views/auth/login.php @@ -1,11 +1,11 @@ diff --git a/views/auth/passwordRecovery.php b/views/auth/passwordRecovery.php index b834c6d0..343d8240 100644 --- a/views/auth/passwordRecovery.php +++ b/views/auth/passwordRecovery.php @@ -1,13 +1,13 @@ title = UserManagementModule::t('front', 'Password recovery'); diff --git a/views/auth/passwordRecoverySuccess.php b/views/auth/passwordRecoverySuccess.php index bc7b678f..058615c4 100644 --- a/views/auth/passwordRecoverySuccess.php +++ b/views/auth/passwordRecoverySuccess.php @@ -1,6 +1,6 @@ title = UserManagementModule::t('front', 'Registration'); diff --git a/views/auth/registrationWaitForEmailConfirmation.php b/views/auth/registrationWaitForEmailConfirmation.php index 05805288..8bf7e6f9 100644 --- a/views/auth/registrationWaitForEmailConfirmation.php +++ b/views/auth/registrationWaitForEmailConfirmation.php @@ -1,10 +1,10 @@ title = UserManagementModule::t('front', 'Registration - confirm your e-mail'); diff --git a/views/layouts/loginLayout.php b/views/layouts/loginLayout.php index a728287d..e5fba485 100644 --- a/views/layouts/loginLayout.php +++ b/views/layouts/loginLayout.php @@ -1,6 +1,6 @@ title = UserManagementModule::t('back', 'Permission creation'); $this->params['breadcrumbs'][] = ['label' => UserManagementModule::t('back', 'Permissions'), 'url' => ['index']]; diff --git a/views/permission/index.php b/views/permission/index.php index 4f8796a2..77eba5af 100644 --- a/views/permission/index.php +++ b/views/permission/index.php @@ -1,10 +1,10 @@ title = UserManagementModule::t('back', 'Permissions'); diff --git a/views/permission/update.php b/views/permission/update.php index b2736079..92f777af 100644 --- a/views/permission/update.php +++ b/views/permission/update.php @@ -1,10 +1,10 @@ title = UserManagementModule::t('back', 'Editing permission: ') . ' ' . $model->name; $this->params['breadcrumbs'][] = ['label' => UserManagementModule::t('back', 'Permissions'), 'url' => ['index']]; diff --git a/views/permission/view.php b/views/permission/view.php index a28af200..97b12252 100644 --- a/views/permission/view.php +++ b/views/permission/view.php @@ -9,8 +9,8 @@ * @var yii\rbac\Permission $item */ -use webvimark\modules\UserManagement\components\GhostHtml; -use webvimark\modules\UserManagement\UserManagementModule; +use vanterbit\modules\UserManagement\components\GhostHtml; +use vanterbit\modules\UserManagement\UserManagementModule; use yii\helpers\ArrayHelper; use yii\helpers\Html; diff --git a/views/role/_form.php b/views/role/_form.php index 764e92ff..66c32399 100644 --- a/views/role/_form.php +++ b/views/role/_form.php @@ -1,10 +1,10 @@ title = UserManagementModule::t('back', 'Role creation'); $this->params['breadcrumbs'][] = ['label' => UserManagementModule::t('back', 'Roles'), 'url' => ['index']]; diff --git a/views/role/index.php b/views/role/index.php index 6d09e1b3..c1c391ac 100644 --- a/views/role/index.php +++ b/views/role/index.php @@ -1,10 +1,10 @@ title = UserManagementModule::t('back', 'Roles'); diff --git a/views/role/update.php b/views/role/update.php index 8c28b7b1..4dbbf01d 100644 --- a/views/role/update.php +++ b/views/role/update.php @@ -1,10 +1,10 @@ title = UserManagementModule::t('back', 'Editing role: ') . ' ' . $model->name; $this->params['breadcrumbs'][] = ['label' => UserManagementModule::t('back', 'Roles'), 'url' => ['index']]; diff --git a/views/role/view.php b/views/role/view.php index 2754628e..dc614563 100644 --- a/views/role/view.php +++ b/views/role/view.php @@ -10,9 +10,9 @@ * @var yii\rbac\Role $role */ -use webvimark\modules\UserManagement\components\GhostHtml; -use webvimark\modules\UserManagement\models\rbacDB\Role; -use webvimark\modules\UserManagement\UserManagementModule; +use vanterbit\modules\UserManagement\components\GhostHtml; +use vanterbit\modules\UserManagement\models\rbacDB\Role; +use vanterbit\modules\UserManagement\UserManagementModule; use yii\helpers\ArrayHelper; use yii\helpers\Html; diff --git a/views/user-permission/set.php b/views/user-permission/set.php index 462a72d2..7ee19c6b 100644 --- a/views/user-permission/set.php +++ b/views/user-permission/set.php @@ -2,12 +2,12 @@ /** * @var yii\web\View $this * @var array $permissionsByGroup - * @var webvimark\modules\UserManagement\models\User $user + * @var vanterbit\modules\UserManagement\models\User $user */ -use webvimark\modules\UserManagement\components\GhostHtml; -use webvimark\modules\UserManagement\models\rbacDB\Role; -use webvimark\modules\UserManagement\UserManagementModule; +use vanterbit\modules\UserManagement\components\GhostHtml; +use vanterbit\modules\UserManagement\models\rbacDB\Role; +use vanterbit\modules\UserManagement\UserManagementModule; use yii\bootstrap\BootstrapPluginAsset; use yii\helpers\ArrayHelper; use yii\helpers\Html; diff --git a/views/user-visit-log/index.php b/views/user-visit-log/index.php index 4d70a702..2726214f 100644 --- a/views/user-visit-log/index.php +++ b/views/user-visit-log/index.php @@ -1,16 +1,16 @@ title = UserManagementModule::t('back', 'Visit log'); diff --git a/views/user-visit-log/view.php b/views/user-visit-log/view.php index ce7a0731..acdd2085 100644 --- a/views/user-visit-log/view.php +++ b/views/user-visit-log/view.php @@ -1,12 +1,12 @@ title = $model->id; diff --git a/views/user/_form.php b/views/user/_form.php index e828d60f..a239a8fc 100644 --- a/views/user/_form.php +++ b/views/user/_form.php @@ -1,14 +1,14 @@ diff --git a/views/user/_search.php b/views/user/_search.php index d5f0c455..d88f021e 100644 --- a/views/user/_search.php +++ b/views/user/_search.php @@ -5,7 +5,7 @@ /** * @var yii\web\View $this - * @var webvimark\modules\UserManagement\models\search\UserSearch $model + * @var vanterbit\modules\UserManagement\models\search\UserSearch $model * @var yii\widgets\ActiveForm $form */ ?> diff --git a/views/user/changePassword.php b/views/user/changePassword.php index 1ec181c0..3d040204 100644 --- a/views/user/changePassword.php +++ b/views/user/changePassword.php @@ -1,12 +1,12 @@ title = UserManagementModule::t('back', 'Changing password for user: ') . ' ' . $model->username; diff --git a/views/user/create.php b/views/user/create.php index f890c518..fbe34ee2 100644 --- a/views/user/create.php +++ b/views/user/create.php @@ -1,11 +1,11 @@ title = UserManagementModule::t('back', 'User creation'); diff --git a/views/user/index.php b/views/user/index.php index 2c5a6565..4301577d 100644 --- a/views/user/index.php +++ b/views/user/index.php @@ -1,21 +1,21 @@ title = UserManagementModule::t('back', 'Users'); @@ -73,7 +73,7 @@ ['class' => 'yii\grid\SerialColumn', 'options'=>['style'=>'width:10px'] ], [ - 'class'=>'webvimark\components\StatusColumn', + 'class'=>'vanterbit\components\StatusColumn', 'attribute'=>'superadmin', 'visible'=>Yii::$app->user->isSuperadmin, ], @@ -91,7 +91,7 @@ 'visible'=>User::hasPermission('viewUserEmail'), ], [ - 'class'=>'webvimark\components\StatusColumn', + 'class'=>'vanterbit\components\StatusColumn', 'attribute'=>'email_confirmed', 'visible'=>User::hasPermission('viewUserEmail'), ], @@ -138,7 +138,7 @@ ], ], [ - 'class'=>'webvimark\components\StatusColumn', + 'class'=>'vanterbit\components\StatusColumn', 'attribute'=>'status', 'optionsArray'=>[ [User::STATUS_ACTIVE, UserManagementModule::t('back', 'Active'), 'success'], diff --git a/views/user/update.php b/views/user/update.php index 0a4ef0a1..a3cd8829 100644 --- a/views/user/update.php +++ b/views/user/update.php @@ -1,14 +1,14 @@ title = UserManagementModule::t('back', 'Editing user: ') . ' ' . $model->username; diff --git a/views/user/view.php b/views/user/view.php index 5623a29b..5ff1285c 100644 --- a/views/user/view.php +++ b/views/user/view.php @@ -1,16 +1,16 @@ title = $model->username;