Skip to content

Commit

Permalink
(fix) fixed domain placeholder issue when using sogo-tool (fixes #4723)
Browse files Browse the repository at this point in the history
  • Loading branch information
extrafu committed May 23, 2019
1 parent 29f5357 commit f57ff86
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS
Expand Up @@ -26,6 +26,7 @@ Bug fixes
- [core] consider DAVx5 like Apple Calendar (#4304)
- [core] improve handling of signer certificate (#4742)
- [core] added safety checks in S/MIME (#4745)
- [core] fixed domain placeholder issue when using sogo-tool (#4723)

4.0.7 (2019-02-27)
------------------
Expand Down
2 changes: 2 additions & 0 deletions SoObjects/SOGo/LDAPSource.h
Expand Up @@ -123,6 +123,8 @@ andMultipleBookingsField: (NSString *) newMultipleBookingsField;

- (void) applyContactMappingToResult: (NSMutableDictionary *) ldifRecord;

- (void) updateBaseDNFromLogin: (NSString *) theLogin;

@end

#endif /* LDAPSOURCE_H */
6 changes: 5 additions & 1 deletion SoObjects/SOGo/SOGoUserManager.m
Expand Up @@ -837,6 +837,10 @@ - (void) _fillContactInfosForUser: (NSMutableDictionary *) theCurrentUser
{
currentSource = [_sources objectForKey: sourceID];

// We update the placeholder in the LDAP source if needed
if ([currentSource conformsToProtocol: @protocol(SOGoDNSource)])
[currentSource updateBaseDNFromLogin: theUID];

// Use the provided domain during the lookup. If none is defined, use the source's one
// so if there's a match based on the source's domain, the user ID will be associated
// to the right source.
Expand Down Expand Up @@ -1078,7 +1082,7 @@ - (NSDictionary *) contactInfosForUserWithUIDorEmail: (NSString *) uid

[self _retainUser: currentUser withLogin: cacheUid];
}
}
} // if (newUser)
}
}
else
Expand Down

0 comments on commit f57ff86

Please sign in to comment.