(feat) support for basic UserInformation queries (fixes #4614)
parent
95680b33a1
commit
af70306d9a
|
@ -3673,6 +3673,48 @@ void handle_eas_terminate(int signum)
|
|||
}
|
||||
}
|
||||
|
||||
if ([(id)[[(id)[theDocumentElement getElementsByTagName: @"UserInformation"] lastObject] getElementsByTagName: @"Get"] lastObject])
|
||||
{
|
||||
NSArray *identities;
|
||||
int i;
|
||||
|
||||
identities = [[context activeUser] allIdentities];
|
||||
|
||||
[s appendString: @"<UserInformation>"];
|
||||
[s appendString: @"<Get>"];
|
||||
|
||||
if ([[context objectForKey: @"ASProtocolVersion"] floatValue] >= 14.1)
|
||||
{
|
||||
[s appendString: @"<Accounts>"];
|
||||
[s appendString: @"<Account>"];
|
||||
[s appendFormat: @"<UserDisplayName>%@</UserDisplayName>", [[[identities objectAtIndex: 0] objectForKey: @"fullName"] activeSyncRepresentationInContext: context] ];
|
||||
}
|
||||
|
||||
[s appendString: @"<EmailAddresses>"];
|
||||
|
||||
if ([[context objectForKey: @"ASProtocolVersion"] floatValue] >= 14.1)
|
||||
[s appendFormat: @"<PrimarySmtpAddress>%@</PrimarySmtpAddress>", [[[identities objectAtIndex: 0] objectForKey: @"email"] activeSyncRepresentationInContext: context] ];
|
||||
else
|
||||
[s appendFormat: @"<SmtpAddress>%@</SmtpAddress>", [[[identities objectAtIndex: 0] objectForKey: @"email"] activeSyncRepresentationInContext: context] ];
|
||||
|
||||
if ([identities count] > 1)
|
||||
{
|
||||
for (i = 1; i < [identities count]; i++)
|
||||
[s appendFormat: @"<SmtpAddress>%@</SmtpAddress>", [[[identities objectAtIndex: i] objectForKey: @"email"] activeSyncRepresentationInContext: context] ];
|
||||
}
|
||||
|
||||
[s appendString: @"</EmailAddresses>"];
|
||||
|
||||
if ([[context objectForKey: @"ASProtocolVersion"] floatValue] >= 14.1)
|
||||
{
|
||||
[s appendString: @"</Account>"];
|
||||
[s appendString: @"</Accounts>"];
|
||||
}
|
||||
|
||||
[s appendString: @"</Get>"];
|
||||
[s appendString: @"</UserInformation>"];
|
||||
}
|
||||
|
||||
[s appendString: @"</Settings>"];
|
||||
|
||||
d = [[s dataUsingEncoding: NSUTF8StringEncoding] xml2wbxml];
|
||||
|
|
1
NEWS
1
NEWS
|
@ -22,6 +22,7 @@ Bug fixes
|
|||
- [eas] fix search on for Outlook application (#4605 and #4607)
|
||||
- [eas] improve search operations and results fetching
|
||||
- [eas] better handle bogus DTStart values
|
||||
- [eas] support for basic UserInformation queries (#4614)
|
||||
|
||||
4.0.4 (2018-10-23)
|
||||
------------------
|
||||
|
|
Loading…
Reference in New Issue