dddp/accounts/ddp.py
def change_password(self, old_password, new_password):
        """Change password."""
        try:
            user = this.user
        except self.user_model.DoesNotExist:
            self.auth_failed()
        user = auth.authenticate(
            username=user.get_username(),
            password=self.get_password(old_password),
        )
        if user is None:
            self.auth_failed()
        else:
            user.set_password(self.get_password(new_password))
            user.save()
            password_changed.send(
                sender=__name__,
                request=this.request,
                user=user,
            )
            return {"passwordChanged": True}
def change_password(self, old_password, new_password):
        """Change password."""
        try:
            user = this.user
        except self.user_model.DoesNotExist:
            self.auth_failed()
        user = auth.authenticate(
            username=user.get_username(),
            password=self.get_password(old_password),
        )
        if user is None:
            self.auth_failed()
        else:
            user.set_password(self.get_password(new_password))
            user.save()
            password_changed.send(
                sender=__name__,
                request=this.request,
                user=user,
            )
            return {"passwordChanged": True}
Change password.