Fixes #7025 - replace default_environment in sys

In System api, default_environment is still being retrieved from the
User (which is no longer being defined there). This fix obtains the
environment from the user's default_organization.