'get_user(default = UNDEFINED)
Provides the user tor is running as. This often only works if tor is
running locally. Also, most of its checks are platform dependent, and hence
are not entirely reliable.
.. versionadded:: 1.1.0
:param object default: response if the query fails
:returns: str with the username tor is running as'

@with_default()
def get_user(self, default=UNDEFINED):

    user = self._get_cache('user')
    if (not user):
        user = self.get_info('process/user', None)
    if ((not user) and self.is_localhost()):
        pid = self.get_pid(None)
        if pid:
            user = stem.util.system.user(pid)
    if user:
        self._set_cache({'user': user})
        return user
    else:
        raise ValueError(("Unable    to    resolve    tor's    user" if self.is_localhost() else "Tor    isn't    running    locally"))
