Mask SharePoint User Details inside a SharePoint list/library

Working for a recent client there was a need to “mask” user information from a Sharepoint list. The list was intended to store user grievances and complaints and the client did not want to store the information of the user entering the information. It was required to keep the information completely anonymous.
So, I found that the following property of a SPList could be the right thing to do in this case
The default behaviour of SharePoint is to store the user information like shown below

List Without Mask
Without Mask

So, now run the following PowerShell command and see the difference

$web=Get-SPWeb "http://sharepointurl"
$list=$web.Lists["Employee Grievances"]
List With Mask
With Mask

So, there you go. Happy SharePoint”ing”

Show Hide SharePoint Columns Programmatically

SPList rList = myweb.Lists[this.List.Title];

SPField field = rList.Fields["SubSites"];

Type type = field.GetType();

MethodInfo mi = type.GetMethod("SetFieldBoolValue", BindingFlags.NonPublic | BindingFlags.Instance);

mi.Invoke(field, new object[] { "Hidden", false });
mi.Invoke(field, new object[] { "CanToggleHidden", true });