(self, newpass, rdb)
Set a password in the database
Set a password in the database
Set a password in the database
def setPass(self, newpass, rdb):
        ''' Set a password in the database '''
        password = self.createPass(newpass)
        results = r.table('users').get(self.uid).update(
            {'password': password}).run(rdb)
        if results['replaced'] == 1:
            return True
        else:
            return False
def setPass ( self , newpass , rdb ) : password = self . createPass ( newpass ) results = r . table ( 'users' ) . get ( self . uid ) . update ( { 'password' : password } ) . run ( rdb ) if results [ 'replaced' ] == 1 : return True else : return False