Skip to content

Add processQueueUserSelectQuery hook to let plugins order the send queue - #1126

Open
Steph501 wants to merge 1 commit into
phpList:mainfrom
Steph501:hook-processqueue-user-select-query
Open

Add processQueueUserSelectQuery hook to let plugins order the send queue#1126
Steph501 wants to merge 1 commit into
phpList:mainfrom
Steph501:hook-processqueue-user-select-query

Conversation

@Steph501

@Steph501 Steph501 commented Aug 5, 2026

Copy link
Copy Markdown

Description

Adds a processQueueUserSelectQuery hook, called with the subscriber select query just before it is run, so that a plugin can change the order in which subscribers are sent to. It is called at both selection points, including the MESSAGEQUEUE_PREPARE branch. With no plugin the query is returned unchanged, so behaviour is unchanged for existing installations.

Related Issue

#1125

Contributor License Agreement

The GitHub authorisation works (confirmed by email), but the return lands on a blank page, on every attempt. I will sign as soon as it is fixed.

The query that selects the subscribers of a campaign has no ORDER BY, so
subscribers are processed in whatever order the database returns them,
which in practice is import order. A plugin has no way to change this:
every existing hook runs after the selection.

This adds one hook, called with the query just before it is run, in both
places where the subscriber list is selected. Without a plugin the query
is returned untouched, so behaviour is unchanged.
@phpListDockerBot

Copy link
Copy Markdown
Contributor

I haven't tried it, but looking at the code looks fine. It does of course allow the plugin to change the entire query, which is slightly worrying, but at this stage, I don't think we need to be bothered about that.

@phpListDockerBot

Copy link
Copy Markdown
Contributor

Yes, the CLA stuff isn't working. I can't figure out why, but as you indicate you went through the process I think it's fine.

Also, can you change the target branch to release-3.7.0 so that it can be added to that release.

@michield

michield commented Aug 9, 2026

Copy link
Copy Markdown
Member

I just noticed I was logged in with the wrong account ;-)
That was me, not the bot writing those comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants