I have noticed the strange behaviour of salesforce due to which even my code broke down in production.
I was trying to stop the user from updating some field..I used before udpate trigger and code like
Ideally it should give the current user in
Trigger.new[i].LastModifiedbyId in but it gives
userinfo.getuserid resolves the problem later.
Any idea about this behaviour of salesforce.