Skip to content

Commit 6a00f33

Browse files
authored
[5.4] Do not get the profile info for the linked user when no user is linked (joomla#46398)
1 parent 6529aaf commit 6a00f33

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

components/com_contact/src/Model/ContactModel.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,10 @@ protected function buildContactExtendedData($contact)
364364
$contact->articles = null;
365365
}
366366

367+
if (empty($contact->user_id)) {
368+
return;
369+
}
370+
367371
// Get the profile information for the linked user
368372
$userModel = $this->bootComponent('com_users')->getMVCFactory()
369373
->createModel('User', 'Administrator', ['ignore_request' => true]);

0 commit comments

Comments
 (0)