#NEWLINE# def change_password( self , user_id , password , new_password ) : #NEWLINE# #INDENT# 'Updates the password for the account with the given ``user_id`` and ``password`` to match\n    ``new_password`` for all future requests.\n    ' #NEWLINE# user_id = user_id . lower ( ) #NEWLINE# account = self . _get_account ( user_id ) #NEWLINE# if ( ( not account ) or ( not secret . verify_password ( password , account [ 'password' ] ) ) ) : #NEWLINE# #INDENT# raise TotoException ( ERROR_USER_NOT_FOUND , 'Invalid user ID or password' ) #NEWLINE# #UNINDENT# self . _update_password ( user_id , account , secret . password_hash ( new_password ) )