Skip to content

Commit

Permalink
Also consider the "mail" attribute in order to get the user's login
Browse files Browse the repository at this point in the history
  • Loading branch information
extrafu committed Apr 5, 2013
1 parent 5487f34 commit b4aaa68
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions SoObjects/SOGo/SOGoSAML2Session.m
Expand Up @@ -43,6 +43,8 @@
#import "SOGoCache.h"
#import "SOGoSAML2Exceptions.h"
#import "SOGoSystemDefaults.h"
#import "SOGoUserManager.h"


#import "SOGoSAML2Session.h"

Expand Down Expand Up @@ -246,6 +248,13 @@ - (void) _updateDataFromLogin
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;
}
Expand Down

0 comments on commit b4aaa68

Please sign in to comment.