ssplugin / ss-user-import-export
以CSV格式导出用户数据,并使用CSV文件导入用户。
2.0.0
2024-07-08 15:49 UTC
Requires
- php: ^8.2
- craftcms/cms: ^5.0.0
README
快速简单地导入用户和导出用户!Craft用户迁移是网站迁移过程中的关键部分。此插件帮助用户使用CSV导入并导出CSV文件中的用户数据。同时,还可以保持用户数据以CSV格式。
要求
此插件需要Craft CMS 5或更高版本以及PHP 8.2或更高版本。
安装
要安装此插件,请按照以下说明操作。
- 在Craft CMS控制面板中,转到设置 → 插件商店并搜索SS用户导入导出
或者
-
打开您的终端并转到您的Craft项目
cd /path/to/project
-
然后告诉Composer加载插件
composer require ssplugin/ss-user-import-export
-
执行迁移
php craft migrate/up --plugin=ss-user-import-export
-
在Craft CMS控制面板中,转到设置 → 插件,并点击SS用户导入导出旁边的“安装”按钮
SS用户导入导出功能
- 易于安装和易于使用。
- 不需要任何额外配置。
- 仅导出您需要的数据。
- 从网站迁移到网站的用户迁移。
- 如果添加了用户字段,则导出用户字段数据。
- 根据您的选择导出用户,如仅导出活动用户。
- 导入用户时可用字段映射。
- 为新导入的活动用户发送激活邮件的选择。
配置SS用户导入导出
使用SS用户导入导出
导出
- Export users using group wise or all the users in the CSV file.
- You can able to enter file name and save exporting file as per your choice name.
- Select status for example only active status users will export. If not selcet any one then all the users exported.
导入
-First, To import multiple users, you need to upload a CSV file.. You can create the CSV file or you can export a CSV file from Export tabs then edit it. Also mapping Field as necessary:
- The CSV file must include all of the columns in the following:
- Field mapping:
- Username* : Username must be a unique and required field.
- Email* : Email must be a unique and valid otherwise users will not imported.
- FirstName (Optional): Select value for first name otherwise empty added.
- LastName (Optional): Select value for last name otherwise empty added.
- Group* : First you need to create a group after that add group handle value in the CSV file. if group value will empty or group handle value incorrect then Default User Group consider (Settings->Users->settings(Allow public registration?) ).
- Status (Optional) : Default value is pending. Status value should be active, pending, suspended.
- Password (Optional): This field value is a simple string not a hashed values. If password value will empty and user status active then activation mail will send to your email address where password set link available.
-User fields:
Supported fieldType is 'Plain Text', 'Radio Buttons', 'Dropdown', 'Lightswitch', 'Email', 'URL' and 'Number'.
SS用户导入导出路线图
插件设置中有两个标签页可用。
(1) 导出
You can able to select multiple groups and status.
If the group is not selected then all the users exported and the same thing will happen in the Status.
(2) 导入:有几个要点需要了解。
- Username and Email are unique and required.
- Activation mail will only go if the proper email setting will be done( Settings < Email ).
- You have to manualy create user group and then use group handle value in the CSV file.
- Pending status: User Status is a pending then admin need to active user account after that user will be able to login.
But if password not import or empty while importing then admin need to Send Activation Mail manualy from CP.
- Active status: Activation mail has been sent to user email address where user can able to set password.
But if password imported while user importing then use r can able to directly login a account.
由ssplugin提供