mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
refactor(core): Decouple user events from internal hooks (no-changelog) (#10292)
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { Container } from 'typedi';
|
||||
|
||||
import { InternalHooks } from '@/InternalHooks';
|
||||
import { LdapService } from '@/Ldap/ldap.service.ee';
|
||||
import {
|
||||
createLdapUserOnLocalDb,
|
||||
@@ -51,11 +50,11 @@ export const handleLdapLogin = async (
|
||||
await updateLdapUserOnLocalDb(identity, ldapAttributesValues);
|
||||
} else {
|
||||
const user = await createLdapUserOnLocalDb(ldapAttributesValues, ldapId);
|
||||
Container.get(InternalHooks).onUserSignup(user, {
|
||||
user_type: 'ldap',
|
||||
was_disabled_ldap_user: false,
|
||||
Container.get(EventService).emit('user-signed-up', {
|
||||
user,
|
||||
userType: 'ldap',
|
||||
wasDisabledLdapUser: false,
|
||||
});
|
||||
Container.get(EventService).emit('user-signed-up', { user });
|
||||
return user;
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user