def change_password(self, id, new, old=None, change_token=True): # pylint: disable=invalid-name,redefined-builtin
        """Change a user's password.

        :param id: User ID as an int.
        :param new: New password as string.
        :param old: (optional) Old password as string (required if performing action as non-admin).
        :param change_token: (optional) If bool `True`, also generate a new API token for user.
        :return: :class:`users.User <users.User>` object
        :rtype: users.User
        """
        schema = UserSchema(exclude=('password', 'password_confirm'))
        resp = self.service.post(self.base+str(id)+'/password/',
                                  params={'change_token': change_token},
                                  json={'old': old, 'new': new, 'new_confirm': new})
        return self.service.decode(schema, resp)
def change_password ( self , id , new , old = None , change_token = True ) : schema = UserSchema ( exclude = ( 'password' , 'password_confirm' ) ) resp = self . service . post ( self . base + str ( id ) + '/password/' , params = { 'change_token' : change_token } , json = { 'old' : old , 'new' : new , 'new_confirm' : new } ) return self . service . decode ( schema , resp )
Change a user's password.

        :param id: User ID as an int.
        :param new: New password as string.
        :param old: (optional) Old password as string (required if performing action as non-admin).
        :param change_token: (optional) If bool `True`, also generate a new API token for user.
        :return: :class:`users.User <users.User>` object
        :rtype: users.User