Skip to content

Commit 686bf2f

Browse files
Fix user messages GetList processor (#16635)
### What does it do? Fixes the join condition in the processor query. ### Why is it needed? The result is incorrect, if in the user profile the `id` is different from the `internalKey`. ### How to test Make sure that on your installation, the (auto-increment) ID column of the `modUserProfile` is out-of-sync with the `modUser` ID. Test that all messages are visible and the values of `username` and `fullname` (in the columns "Sender" and "Recipient") correspond to each other. ### Related issue(s)/PR(s) Resolves #16634 for MODX 3.x
1 parent e155f60 commit 686bf2f

File tree

1 file changed

+2
-2
lines changed
  • core/src/Revolution/Processors/Security/Message

1 file changed

+2
-2
lines changed

core/src/Revolution/Processors/Security/Message/GetList.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ public function prepareQueryBeforeCount(xPDOQuery $c)
4040
{
4141
$c->innerJoin(modUser::class, 'Sender');
4242
$c->innerJoin(modUser::class, 'Recipient');
43-
$c->innerJoin(modUserProfile::class, 'SenderProfile', 'SenderProfile.id = modUserMessage.sender');
44-
$c->innerJoin(modUserProfile::class, 'RecipientProfile', 'RecipientProfile.id = modUserMessage.recipient');
43+
$c->innerJoin(modUserProfile::class, 'SenderProfile', 'SenderProfile.internalKey = modUserMessage.sender');
44+
$c->innerJoin(modUserProfile::class, 'RecipientProfile', 'RecipientProfile.internalKey = modUserMessage.recipient');
4545

4646
switch ($this->getProperty('type')) {
4747
case 'outbox':

0 commit comments

Comments
 (0)