Skip to content

Commit

Permalink
- OCUser: ignore empty gaUser.onPremisesSamAccountName values to avoi…
Browse files Browse the repository at this point in the history
…d empty .userName properties
  • Loading branch information
felix-schwarz committed Jan 28, 2025
1 parent 110c5cd commit 6cfb048
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ownCloudSDK/Identity/OCUser.m
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ + (instancetype)userWithGraphDisplayname:(NSString *)displayName identifier:(NSS

+ (instancetype)userWithGraphUser:(GAUser *)gaUser
{
OCUser *user = [self userWithGraphDisplayname:gaUser.displayName identifier:gaUser.identifier userType:gaUser.userType userName:gaUser.onPremisesSamAccountName];
OCUser *user = [self userWithGraphDisplayname:gaUser.displayName identifier:gaUser.identifier userType:gaUser.userType userName:([gaUser.onPremisesSamAccountName isEqual:@""] ? nil : gaUser.onPremisesSamAccountName)];

if (gaUser.memberOf.count > 0)
{
Expand Down

0 comments on commit 6cfb048

Please sign in to comment.