Merge pull request #32 from ibotty/log-uid

also log uid when email not found
This commit is contained in:
Ian 2021-05-20 17:34:17 -07:00 committed by GitHub
commit c090fb5a52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,7 +142,11 @@ fn invite_from_ldap(
// println!("Invite response: {:?}", response);
}
} else {
println!("Warning: Email field, {:?}, not found on user", mail_field);
match ldap_user.attrs.get("uid").and_then(|l| l.first()) {
Some(user_uid) =>
println!("Warning: Email field, {:?}, not found on user {}", mail_field, user_uid),
None => println!("Warning: Email field, {:?}, not found on user", mail_field)
}
}
}