Determine user type and privileges by user id