Fixed the method that returns the current-user-principal.

This commit is contained in:
Ludovic Marcotte
2012-11-29 15:49:32 -05:00
parent 3e8f7cb29e
commit 73ff981d4f
2 changed files with 4 additions and 2 deletions

View File

@@ -32,6 +32,7 @@
- (NSArray *) davCalendarUserAddressSet;
- (NSArray *) davCalendarHomeSet;
- (NSArray *) davCalendarScheduleInboxURL;
- (NSArray *) davCalendarScheduleOutboxURL;
@end

View File

@@ -1236,7 +1236,7 @@
- (SOGoWebDAVValue *) davCurrentUserPrincipal
{
NSDictionary *userHREF;
NSString *login;
NSString *login, *s;
SOGoUser *activeUser;
SOGoWebDAVValue *davCurrentUserPrincipal;
@@ -1246,7 +1246,8 @@
davCurrentUserPrincipal = nil;
else
{
userHREF = davElementWithContent (@"href", XMLNS_WEBDAV, [self davURLAsString]);
s = [NSString stringWithFormat: @"/SOGo/dav/%@", login];
userHREF = davElementWithContent (@"href", XMLNS_WEBDAV, s);
davCurrentUserPrincipal
= [davElementWithContent (@"current-user-principal",
XMLNS_WEBDAV,