(self, username, rdb)
return self.active
Check if a user exists or not
Check if a user exists or not
Check if a user exists or not
def is_active(self, username, rdb):
        ''' Check if a user exists or not '''
        count = r.table('users').filter(
            {'username': username}).count().run(rdb)
        if count >= 1:
            self.active = True
        else:
            self.active = False
        return self.active
def is_active ( self , username , rdb ) : count = r . table ( 'users' ) . filter ( { 'username' : username } ) . count ( ) . run ( rdb ) if count >= 1 : self . active = True else : self . active = False return self . active