How can i change the user attar in plugin

I wrote a plug-in that needs to change the user’s field attributes, how to achieve it?

I created a file under models under the plugin: users-permissions_user.settings.json

  "collectionName": "users-permissions_user",
  "info": {
    "name": "user"
  "attributes": {
    "username": {
      "type": "string",
      "required": false

but is wrong!

[2021-05-29T16:00:27.289Z] error Error: Duplicated collection name: `users-permissions_user`.
The same collection name can't be used for two different models.
First found in Plugin `users-permissions`, model `user`.
Second found in Plugin `auth-wechat-minprogram`, model `users-permissions_user`.
    at E:\adopt\serve\node_modules\strapi-database\lib\validation\check-duplicated-table-names.js:55:13
    at Array.forEach (<anonymous>)
    at checkDuplicatedTableNames (E:\adopt\serve\node_modules\strapi-database\lib\validation\check-duplicated-table-names.js:47:18)
    at validateModelSchemas (E:\adopt\serve\node_modules\strapi-database\lib\validation\index.js:7:3)
    at DatabaseManager.initialize (E:\adopt\serve\node_modules\strapi-database\lib\database-manager.js:39:5)
    at Strapi.load (E:\adopt\serve\node_modules\strapi\lib\Strapi.js:354:19)
    at async Strapi.start (E:\adopt\serve\node_modules\strapi\lib\Strapi.js:196:9)
error Command failed with exit code 1.
info Visit for documentation about this command.

how to achieve it?

You’ve created the model with the same name in ./plugins/auth-wechat-minprogram, which is wrong.
You should use extensions if you want to modify some the plugin’s files.

  1. Create the file in: ./extensions/users-permissions/models/User.settings.json,
  2. Copy the content from ./node_modules/strapi-plugin-users-permissions/models/User.settings.json to the newly created file
  3. Now you can modify the file in ./extensions/users-permissions/models/User.settings.json and add new fields.

but i want to do this in plugin.
i want to user install my plugin is do all done in my plugin

Currently, you can’t achieve this.
In order to extend another plugin, you should use extensions.

It;s so bad. but thank you