I have an administator, which also is Farm Administrator in my Sharepoint environment. It is synced via UPSA and have all the properties I need do display content the right way. However - when I check the admin user in code behind it gets magically transferred to be SHAREPOINT\system instead of DOMAIN\Administrator... why is that?
Code behind:
try
{
SPWeb currentWeb = SPContext.Current.Web;
SPUser currentUser = currentWeb.CurrentUser;
// currentUser is now SHAREPOINT\System
The Code behind is in a regular WebControlCode. Regular non-admin users get the correct currentUser attribute.