Fixes #7045 - fix location undefined for user

Fix issue where location is undefined for User in find_only_environment
of the system api. Also remove un-needed logic in find_only_environment.
@daviddavis updated, thanks this is a lot cleaner