mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
feat(core): Add user.profile.beforeUpdate hook (#8144)
Add `user.profile.beforeUpdate` hook so we can prevent user email change if it overlaps with other users email.
This commit is contained in:
@@ -73,6 +73,8 @@ export class MeController {
|
||||
}
|
||||
}
|
||||
|
||||
await this.externalHooks.run('user.profile.beforeUpdate', [userId, currentEmail, payload]);
|
||||
|
||||
await this.userService.update(userId, payload);
|
||||
const user = await this.userService.findOneOrFail({ where: { id: userId } });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user