If you try to get the current user login name or name in SharePoint and if it shows SHAREPOINT\System account, that’s because the current logged user is an admin account and is probably the one used in the application pool of the site. Also, you are probably getting the current user from an elevated SPWeb inside a RunWithElevatedPrivileges code. You can use the snippet below to get the real user:
SPWeb site = SPContext.Current.Web;
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite ElevatedsiteColl = new SPSite(siteColl.ID))
{
using (SPWeb ElevatedSite = ElevatedsiteColl.OpenWeb(site.ID))
{
//Don't use the ElevatedSite.CurrentUser
string currUser = site.CurrentUser;
}
}
});
This will show the real login name instead of SHAREPOINT\System
Bear in mind that the code above is just a snippet and to show you the idea. Please make sure you use the SharePoint best practices coding for disposing objects when using the snippet above.
Hope that helps !