Skip to content

Commit 18f61e6

Browse files
juliaschroederjengelh
authored andcommitted
ab_tree: implement GUID based essdn for domains
1 parent 38956ba commit 18f61e6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/ab_tree.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,13 @@ std::string ab_base::displayname(minid mid) const
316316
bool ab_base::dn(minid mid, std::string& essdn) const
317317
{
318318
const sql_user *user = fetch_user(mid);
319-
if (!user)
320-
return false;
319+
if(!user) {
320+
char guid_str[33];
321+
GUID(mid).to_str(guid_str, std::size(guid_str));
322+
essdn = "/guid=";
323+
essdn += guid_str;
324+
return true;
325+
}
321326
auto username = user_info(mid, userinfo::mail_address);
322327
const ab_domain *domain = find_domain(user->domain_id);
323328
return cvt_username_to_essdn(username, AB.org_name().c_str(), user->id, domain->id, essdn) == ecSuccess;

0 commit comments

Comments
 (0)