(self, password, rdb)
Check if the password supplied is valid
Check if the password supplied is valid
Check if the password supplied is valid
def checkPass(self, password, rdb):
        ''' Check if the password supplied is valid '''
        results = r.table('users').get(self.uid).run(rdb)
        data = results
        if not data:
            return "No data found"
        else:
           if check_password_hash(data['password'], password):
              self.setPass(password, rdb)
              return True
           else:
              password = self.saltPass(password)
              return check_password_hash(data['password'], password)
def checkPass ( self , password , rdb ) : results = r . table ( 'users' ) . get ( self . uid ) . run ( rdb ) data = results if not data : return "No data found" else : if check_password_hash ( data [ 'password' ] , password ) : self . setPass ( password , rdb ) return True else : password = self . saltPass ( password ) return check_password_hash ( data [ 'password' ] , password )