fix creating user reference when case sharing is enabled
Merge pull request #615 from dimagi/cz

fix creating user reference when case sharing is enabled