public string SearchUserByDepartment(string departmentID, string conditionXml, bool recursive) { if (!header.VerifyCredentials(header.UserName, header.Password, header.Type)) { return(string.Empty); } string url = System.Configuration.ConfigurationManager.AppSettings["WSAF.PhotoUrl"]; Guid gDepartmentID = (Guid)XmlSerializer.Deserialize(departmentID); User[] users = OrganizationPublicHelper.SearchUserByDepartment(gDepartmentID, conditionXml, recursive); foreach (User user in users) { if (!string.IsNullOrEmpty(url) && !string.IsNullOrEmpty(user.Photo)) { user.Photo = url + user.Photo; } } return(XmlSerializer.Serialize(users)); }