I am user user1 (which is also the user of the app pool of SharePoint, so when I log on with user user1 it says "Welcome System Account").
In my code, i want to test if a file is checked out by user1, so the result of the following:
file.CheckedOutBy.LoginName.ToLower() == userName.ToLower())
is always false (which is not correct). CheckedOutBy value is "SharePoint System" while username value is "user1".
How can I resolve this?