find users which are in the same group

fixes the user search in the share drop-down if "Allow users to only share with users in their groups" option is set in the admin settings. To make it work on master also this issue needs to be solved: https://github.com/owncloud/core/issues/5209

Here is the same pull request for stable5 where it should work straight away: https://github.com/owncloud/core/pull/5211

Fixes: https://github.com/owncloud/core/issues/5155