Also consider the "mail" attribute in order to get the user's login

This commit is contained in:
Ludovic Marcotte
2013-04-05 10:26:17 -04:00
parent 5487f34b9e
commit b4aaa68d85

View File

@@ -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;
}