From b4aaa68d85edbaee9f555efef3f82f64598c050f Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Fri, 5 Apr 2013 10:26:17 -0400 Subject: [PATCH] Also consider the "mail" attribute in order to get the user's login --- SoObjects/SOGo/SOGoSAML2Session.m | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SoObjects/SOGo/SOGoSAML2Session.m b/SoObjects/SOGo/SOGoSAML2Session.m index 01c6f4bb2..3576ee148 100644 --- a/SoObjects/SOGo/SOGoSAML2Session.m +++ b/SoObjects/SOGo/SOGoSAML2Session.m @@ -43,6 +43,8 @@ #import "SOGoCache.h" #import "SOGoSAML2Exceptions.h" #import "SOGoSystemDefaults.h" +#import "SOGoUserManager.h" + #import "SOGoSAML2Session.h" @@ -246,6 +248,13 @@ LassoServerInContext (WOContext *context) login = [NSString stringWithUTF8String: textNode->content]; [login retain]; } + else if (strcmp (attribute->Name, "mail") == 0) + { + value = LASSO_SAML2_ATTRIBUTE_VALUE (attribute->AttributeValue->data); + textNode = value->any->data; + login = [[SOGoUserManager sharedUserManager] getUIDForEmail: [NSString stringWithUTF8String: textNode->content]]; + [login retain]; + } else attributeList = attributeList->next; }