I have built a Web Part in Visual Studio 2008 to show the current user's information (this is for WSS 3.0).
I have no problem iterating through all the fields in the SPListItem, but I want to filter out the fields that are NOT shown on the User Information page (_layouts/userdisp.aspx). I can't seem to identify the property to compare to. When I filter by Hidden = false, I still get SIP Address, Content Type, etc.
An explanation: When a user views their information from the user information list in one site collection, they see Account, Name, E-Mail, Job Title, About Me, etc. In a different site collection, we have added Department, Code and Branch. I want to create a Web Part that shows the visible fields, so I can deploy it across all site collections without customizing. One option is to make these fields required, and then filter by Required = true, but these are not necessarily required fields and I would have to edit every site collection for it to work.
Any suggestions on what property or properties to use? I used the WSS-3.0 tag for this question, as I think the answer would be different in SharePoint Foundation.