get current user instance in apex code example Example: apex get current user id UserInfo.getUserId()