mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Update users.ts (#9024)
This commit is contained in:
@@ -183,7 +183,14 @@ export class UsersService extends ItemsService {
|
||||
}
|
||||
|
||||
if (data.email) {
|
||||
await this.checkUniqueEmails([data.email]);
|
||||
if (keys.length > 1) {
|
||||
throw new RecordNotUniqueException('email', {
|
||||
collection: 'directus_users',
|
||||
field: 'email',
|
||||
invalid: data.email,
|
||||
});
|
||||
}
|
||||
await this.checkUniqueEmails([data.email], keys[0]);
|
||||
}
|
||||
|
||||
if (data.password) {
|
||||
|
||||
Reference in New Issue
Block a user