🐛 fix(migration cmd): update LDAP util search base and logging

This commit is contained in:
Khaled FERJANI
2025-10-03 13:21:19 +02:00
parent ef9dec8332
commit ab13e36fd7
@@ -57,11 +57,13 @@ function searchForUserMobile(
config: LdapConfig, config: LdapConfig,
username: string, username: string,
): Promise<string | null> { ): Promise<string | null> {
console.log(`searching for user ${username} mobile in LDAP`);
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
client.search( client.search(
config.searchBase, config.searchBase,
{ {
filter: `(&(objectClass=inetorgperson)(uid=${username}))`, filter: `(&(objectClass=*)(uid=${username}))`,
attributes: ["mobile"], attributes: ["mobile"],
scope: "sub", scope: "sub",
}, },