(gasharl) Fixed a NPE thrown when commiting a user object with no badge number.