'Set the current user.'

def set_user(self, user):

    if self.galaxy_session:
        self.galaxy_session.user = user
        self.sa_session.add(self.galaxy_session)
        self.sa_session.flush()
    self.__user = user
