Ejemplo n.º 1
0
 public static ADUser IntraUserObjectToADObject(this IntraUser user) =>
 new ADUser
 {
     CN                = $"CN={user.UserData.FirstName} {user.UserData.LastName}",
     SN                = user.UserData.LastName,
     Name              = $"{user.UserData.FirstName} {user.UserData.LastName}",
     DisplayName       = $"{user.UserData.FirstName} {user.UserData.LastName}",
     GivenName         = user.UserData.FirstName,
     UserPrincipalName = $"{user.UserData.FirstName.ToLowerInvariant()}.{user.UserData.LastName.ToLowerInvariant().Replace(" ", ".")}@desideriushogeschool.be",
     Mail              = $"{user.UserData.FirstName.ToLowerInvariant()}.{user.UserData.LastName.ToLowerInvariant().Replace(" ", ".")}@desideriushogeschool.be",
     SAMAccountName    = $"{user.UserData.FirstName.ToLowerInvariant()}.{user.UserData.LastName.ToLowerInvariant().Replace(" ", ".")}",
     Role              = user.UserData.Role,
     ObjectGUID        = user.MetaData.GUID,
     Study             = user.UserData.Study,
     BirthDay          = user.UserData.BirthDay,
     ObjectVersion     = user.MetaData.Version,
     UserPassword      = user.UserData.Password
 };
Ejemplo n.º 2
0
 public static ExtraUser ConvertIntraToExtra(this IntraUser user) =>
 new ExtraUser
 {
     UserData = new XUserData
     {
         FirstName = user.UserData.FirstName,
         LastName  = user.UserData.LastName,
         Email     = user.UserData.Email,
         Role      = user.UserData.Role,
         Study     = user.UserData.Study,
         BirthDay  = user.UserData.BirthDay
     },
     MetaData = new MetaData
     {
         GUID    = user.MetaData.GUID,
         Version = user.MetaData.Version,
     }
 };