Getting the current userid

The current user ID can be retrieved through the TWUser variable in tw.system.user.