Fix missing XT.username on obj_share inserts.
Move XT.username check.
Merge pull request #1283 from bendiy/count

Fix missing XT.username on obj_share inserts.