Fetch all user shares in one query

This will fetch all user shares in a single run, not user by user as
done previously. Saves one query and can possibly increase SQL execution
time.

Addresses #246