diff --git a/packages/plugins/users/src/server.ts b/packages/plugins/users/src/server.ts index 0050e15be..9335345e3 100644 --- a/packages/plugins/users/src/server.ts +++ b/packages/plugins/users/src/server.ts @@ -155,6 +155,10 @@ export default class UsersPlugin extends Plugin { async install(options) { const { rootNickname, rootPassword, rootEmail } = this.getInstallingData(options); const User = this.db.getCollection('users'); + if (await User.repository.findOne({ filter: { email: rootEmail } })) { + return; + } + const user = await User.repository.create({ values: { email: rootEmail,