def __getattr__(self, name): if name == 'is_admin': return self.admin == True if name == 'is_online': return self.name in hruntime.app.sessions.online_users return DBObject.__getattr__(self, name)
def __getattr__(self, name): if name == 'online_users': return hruntime.app.sessions.online_users return DBObject.__getattr__(self, name)