private void PopulateSearchResult(SearchResult searchResult, KerberosResult kerbResult, ContactResults contactResults) { var contact = contactResults.ResponseData.Results.FirstOrDefault(); searchResult.Found = true; searchResult.KerbId = kerbResult.UserId; searchResult.IamId = kerbResult.IamId; searchResult.Email = contact?.Email; searchResult.WorkPhone = contact?.WorkPhone; searchResult.FullName = kerbResult.FullName; searchResult.FirstName = kerbResult.FirstName; searchResult.LastName = kerbResult.LastName; searchResult.Pronouns = kerbResult.DPronouns; searchResult.IsEmployee = kerbResult.IsEmployee; searchResult.IsFaculty = kerbResult.IsFaculty; searchResult.IsStudent = kerbResult.IsStudent; searchResult.IsHSEmployee = kerbResult.IsHSEmployee; searchResult.IsExternal = kerbResult.IsExternal; searchResult.IsStaff = kerbResult.IsStaff; searchResult.PpsId = kerbResult.PpsId; searchResult.StudentId = kerbResult.StudentId; searchResult.BannerPidm = kerbResult.BannerPidm; searchResult.EmployeeId = kerbResult.EmployeeId; searchResult.MothraId = kerbResult.MothraId; }
private Person GetPersonDetails(KerberosResult ucdKerbPerson, ContactResult ucdContact) { return(new Person { GivenName = string.IsNullOrWhiteSpace(ucdKerbPerson.DFirstName) ? ucdKerbPerson.OFirstName : ucdKerbPerson.DFirstName, Surname = string.IsNullOrWhiteSpace(ucdKerbPerson.DLastName) ? ucdKerbPerson.OLastName : ucdKerbPerson.DLastName, FullName = string.IsNullOrWhiteSpace(ucdKerbPerson.DFullName) ? ucdKerbPerson.OFullName : ucdKerbPerson.DFullName, Kerberos = ucdKerbPerson.UserId, Mail = ucdContact.Email, WorkPhone = ucdContact.WorkPhone }); }
private Person CreatePerson(string email, KerberosResult ucdKerbPerson, string iamId) { var user = new Person() { GivenName = ucdKerbPerson.DFirstName, Surname = ucdKerbPerson.DLastName, FullName = ucdKerbPerson.DFullName, Kerberos = ucdKerbPerson.UserId, Mail = email }; return(user); }
private User CreateUser(string email, KerberosResult ucdKerbPerson, string iamId) { var user = new User() { FirstName = ucdKerbPerson.FirstName, LastName = ucdKerbPerson.LastName, Id = ucdKerbPerson.UserId, Email = email, Iam = iamId }; return(user); }