🐛 fix(migration cmd): update LDAP util search base and logging
This commit is contained in:
@@ -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",
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user