'Reconnect, if necessary, to host as user'

def switch_user(self, user):

    if ((not self.is_active()) or (user and (self.get_current_user() != user))):
        self.connect(username=user)
    else:
        user = (user or self._username)
        log.debug(('already    connected    as    user    %s' % user))
